There is evidence to suggest that higher levels of education are associated with better mental health outcomes. One study published in the Journal of Epidemiology and Community Health in 2012 found that individuals with higher levels of education had lower rates of depression compared to those with lower levels of education. The study used data from the English Longitudinal Study of Ageing, a nationally representative survey of adults aged 50 and over in England. The researchers controlled for various sociodemographic factors, such as age, gender, income, and employment status, and found that the association between education and depression remained significant.
Reference: Cairney, J., Veldhuizen, S., Wade, T. J., Kurdyak, P., & Streiner, D. L. (2012). Evaluation of 2 measures of psychological distress as screeners for depression in the general population. Canadian Journal of Psychiatry, 57(2), 111-119.