Cross-sectional study investigated the association of fresh or minimally processed foods and ultra-processed food consumption with symptoms of depression, anxiety and stress in students from a Brazilian public university. Undergraduate students admitted in 2022 answered an online questionnaire during their first semester. Consumption of 12 subgroups of fresh or minimally processed foods and 13 of ultra-processed foods on the previous day were investigated (affirmative answer for ≥ 5 subgroups was classified as high consumption). Depression, anxiety and stress were investigated using the DASS-21 and mild to extremely severe symptoms were grouped to be compared with individuals without symptoms. Adjusted logistic regression models estimated the Odds Ratio (OR) of the association between symptoms of depression, anxiety and stress (outcomes) and food consumption (exposures), with a significance level of 5%. A total of 924 students were evaluated, of whom 57.7% presented symptoms of depression, 51.9% of anxiety and 59.4% of stress. A high consumption of fresh or minimally processed foods was observed in 80.3% of the students, with a higher frequency among those without symptoms of depression, anxiety, and stress, while 38.9% showed a high consumption of ultra-processed foods, without differences according to symptoms. High consumption of fresh or minimally processed foods was associated with a lower likelihood of symptoms of depression (OR: 0.62; p=0.011), anxiety (OR: 0.58; p=0.003) and stress (OR: 0.69; p=0.043). No association was found between ultra-processed and mental health outcomes. Actions that support and encourage the consumption of healthy food in the university environment can contribute to mental health outcomes.