BackgroundThere is growing evidence that vitamin D may be related to mental health. The aim of the current study was to investigate the association of dietary and blood inflammatory factors with mental health disorders in subjects with vitamin D deficiency, shedding further light on the complex interplay of these conditions.MethodIn this cross‐sectional study, 306 subjects completed the validated Depression, Anxiety, and Stress Scale questionnaire to evaluate their depression, anxiety, and stress scores. Dietary inflammatory index (DII) and healthy eating index (HEI) were calculated using a validated 65‐item food frequency questionnaire. Blood samples were taken and vitamin D, cytokine, and hs‐CRP levels were measured using enzyme‐linked immunosorbent assay kits. Platelet to lymphocyte ratio (PLR) and neutrophil to lymphocyte ratio (NLR) were calculated using standard laboratory methods.ResultsThe subjects were divided into two groups based on their vitamin D levels: a vitamin D < 20 μg/dl group (N = 257) and a vitamin D ≥ 20 μg/dl group (N = 49). Between group analysis revealed that only DII (p = 0.015), platelet (p = 0.04), and hs‐CRP (p = 0.015) were significantly different. In adults with vitamin D levels below 20 μg/dl, NLR and DII were significantly higher in subjects with anxiety (p < 0.05), and this relationship remained significant only for NLR after adjusting for age and sex. Additionally, PLR and HEI were significantly different in depressed compared to non‐depressed subjects, and this association remained significant only for HEI after adjusting for age and sex.ConclusionIn subjects with vitamin D deficiency, increased levels of PLR, NLR, and DII were associated with depression and anxiety, while HEI was negatively associated with depression. These associations were not found in subjects with vitamin D levels ≥20 μg/dl.