BACKGROUND: Dietary patterns are strongly linked to the risk of major depressive disorder (MDD). However, research on the relationship between dietary patterns and MDD with suicidal ideation (MDD + SI) are limited. The Healthy Eating Index (HEI)-2015, Dietary Inflammatory Index (DII), Comprehensive Dietary Antioxidant Index (CDAI), Oxidative Balance Score (OBS), and Dietary Index for Gut Microbiota (DI-GM) are five validated tools for assessing dietary patterns based on inflammation, antioxidant capacity, and gut microbiota diversity. This study aims to investigate the association between these dietary indices and MDD + SI. METHODS: A total of 23,621 participants from the 2007-2020 National Health and Nutrition Examination Survey were included in this study. MDD and SI were assessed using the PHQ-9. Weighted multivariable logistic regression, subgroup analyses, and restricted cubic spline (RCS) models were applied to analyze the relationships between five dietary indices and the risks of MDD and MDD + SI. RESULTS: All five dietary indices showed associations with MDD to varying degrees
however, only DI-GM exhibited a significant negative association with MDD + SI after adjustment for confounding factors. Subgroup and stratified linear trend analyses revealed that this association was stronger among former smokers, obese individuals and those with hypertension or diabetes. RCS analysis showed a significant non-linear relationship between DI-GM and MDD, while a significant linear dose-response relationship was observed for DI-GM and MDD + SI. LIMITATIONS: Cross-sectional study designs cannot establish causality. CONCLUSION: The findings of this study revealed a significant association between DI-GM and MDD + SI. Dietary interventions that promote gut microbiota diversity may help reduce the risk of MDD + SI.