Depression and vitamin D deficiency are often co-occurring pathologies, the common pathogenetic ground of which includes an augmented inflammatory response. However, the molecular details of this relationship remain unclear. Here, we used a bioinformatic approach to analyze GEO transcriptome datasets of major depressive disorder (MDD) and vitamin D deficiency (VDD) to identify the hub genes within the regulatory networks of commonly differentially expressed genes (DEGs). The MDD-VDD shared regulatory network contains 100 DEGs (71 upregulated and 29 downregulated), with six hub genes (PECAM1, TLR2, PTGS2, LRRK2, HCK, and IL18) all significantly upregulated, of which PTGS2 (also known as COX2) shows the highest inference score and reference count. The subsequent analysis of the miRNA-transcription factors network identified COX2, miR-146a-5p, and miR-181c-5p as key co-regulatory actors in the MDD-VDD shared molecular pathogenic mechanisms. Subsequent analysis of published MDD and VDD transcriptome data confirmed the importance of the identified hub genes, further validating our bioinformatic analytical pipeline. Our study demonstrated that PTGS2 was highly upregulated in both depressive patients and patients with low vitamin D plasma levels. Therefore, regulators targeting PTGS2, like miR-146a-5p and miR181c-5p, may have great potential in controlling both diseases simultaneously, accentuating their role in future research.