The impact of diet on mental well-being and gut microorganisms in humans is well recognized. However, research on the connections between food nutrients, gut microbiota, and mental health remains limited. To address this, the present study aimed to assess the effects of a personalized diet, based on individual needs and aligned with the Mediterranean diet principles, on depression symptoms, quality of life, nutritional intake, and gut microbiota changes among older adults living in the community. The intervention involved regular visits from a registered dietitian, who provided tailored dietary recommendations. During the 6-month study, participants completed questionnaires to evaluate their depression levels, quality of life, and dietary habits. Additionally, they provided stool samples for analysis of gut microbiota and metabolites. The results demonstrated that the personalized dietary intervention reduced depression symptoms and improved the quality of life among older adults. Furthermore, significant changes in the intake of certain nutrients, such as folate, lutein, zeaxanthin, EPA, and DHA, were observed following the intervention. Moreover, the intervention was associated with increased diversity in the gut microbiome and reduced total short-chain fatty acids, the main metabolites produced by gut microorganisms. The study also revealed correlations between food nutrients, gut microbiota, and mental health parameters. In conclusion, this research highlights the potential advantages of personalized dietary interventions in managing depression and enhancing overall well-being among older populations. It also sheds light on the role of gut microbiota and its metabolites in these effects. The findings offer valuable insights into the significance of nutrition and gut health for mental well-being in older adults.