In the present study, the mental health subgroups, such as the stress, anxiety, and depression, before and after adjustment for the confounders, were lower mean in the upper ENRF quartiles, but significance was observed only for the stress subgroup after controlling the confounders.
Diet plays an important role in improving or advancing mental illness In line with our study concerning depression and anxiety, Lizanne JS. Schweren and et al. in a cohort study showed that diet is unlikely to prevent depression and anxiety in the community in the long run  and Murakami et al. also in their systematic review, found no association between dietary variables and depressive symptoms . However, against these studies, Poorrezaeian and colleagues in two cross-sectional study found an inverse relationship between anxiety and depression with dietary diversity score as the healthy eating index in women [40, 41], because dietary diversity is positively associated with dietary micronutrients and negatively correlated with micronutrient deficiencies intake , and the relationship between the consumption of processed foods, commercial baked goods, fast foods, and sweets, with an increased risk of depression, due to the high content of saturated fats, trans-fatty acids, added sugar and refined carbohydrates and low content of fiber and nutrients, has been seen in observational studies . Gibson-Smith et al. found that the quality of the diet was poorer in people with anxiety disorders and depression . Another opposed study has shown, people who received a Mediterranean diet in 3 months had better scores on depression and overall mental health scores than those who did not, due to improvements in the quality of their diet .
Deficiency in some B and C vitamins and iron has been linked to psychological symptoms , and many of the nutrients offered are effective against depression [47, 48], in this context, Lisa and colleagues report that folate, B12, iron, selenium, and zinc deficiency are more common in depressed people . Because vitamin D affects brain structure, neuronal differentiation, binding, dopamine pathways, neurotransmitters, brain calcium homeostasis, inflammatory markers, nerve growth factor synthesis, and the response of the hypothalamic-pituitary-adrenocortical axis to threat, zinc is important for energy metabolism, macronutrient stabilization, regulation of protein synthesis, neuronal progenitor cell activity, neurotransmitters, neutrophils, and antioxidants, iron is needed for energy production, phospholipid metabolism, myelination and the synthesis of neurotransmitters and DNA , calcium works by activating tryptophan hydroxylase and synthesizing serotonin  and omega-3 fatty acid has anti-inflammatory or neuroendocrine modulating effects . Folate-derived coenzymes, B12 and B6, are also involved in the synthesis and metabolism of dopamine and serotonin. Besides, vitamins B6 and B12, as a cofactor, convert homocysteine, that inadequate nutrition of these vitamins can lead to the accumulation of homocysteine and reduced monoamines synthesis in the brain, which may play a vital role in mental health etiology . Therefore, perhaps the reason for not meaningful of anxiety and depression in the present study can be related to a significant reduction in B vitamins and zinc, and meaninglessness of nutrients such as vitamin D, omega 3, iron, and vitamin C in quartiles of ENRF index score.
In our study, among all of the food groups, vegetables, dairy, meat and poultry, and tea and coffee were significant across ENRF quartiles. Micronutrients in vegetables like B group vitamins and their metabolites[54–56] and the others such as vitamin C , calcium , and zinc , which regulate brain pathways . Green leafy vegetables are proper sources of magnesium that insufficient magnesium can cause headaches and fatigue and exacerbate the effects of stress . In our study, magnesium intake also increased with increasing ENRF quartile, which can be one of the reasons for a significant stress reduction. Because magnesium is the main cofactor in the synthesis of neurotransmitters and adrenaline and is participated in neuronal cell metabolism. It was seen that low serum magnesium concentrations, in response to stress, increase the release of stress-related hormones, including cortisol, adrenocorticotrophic hormone, and catecholamines [63, 64], which affects their access to the brain and creates a vicious cycle of reduced stress resistance and further magnesium depletion [65, 66]. In addition to the vegetables, in the study of Laugero et al., stress was also associated with lower protein intake , because of the amino acid tryptophan in meat, which can play a momentous role in relieving mood, satiety, and sleep regulation by converting to serotonin that could help mental health . The positive relationship between dairy consumption, with some cognitive and psychological health measures, has been found in the study of Crichton et al . In our study, calcium was higher at the top of the ENRF quartile, since milk and other dairy products account for more than half of the dietary calcium intake in most parts of the world , their stress-relieving properties can also be attributed to more calcium intake. People with higher HEI scores are more likely to eat nutritious foods that when replacing junk food with fresh, high-fiber plant-based foods, they will consume few nutrients that are essential for healthy metabolism and provide significant stress protection . Vitamin B is used as a cofactor for adrenaline synthesis in stress response, and it is also used to synthesize neurotransmitters such as serotonin and dopamine that affect stress [73, 74].