In 21st-century public health, rapid urbanization and mental health disorders are a growing global concern. The relationship between diet, brain function and the risk of mental disorders has been the subject of intense research in recent years. In this review, we examine some of the potential socioeconomic and environmental challenges detracting from the traditional dietary patterns that might otherwise support positive mental health. In the context of urban expansion, climate change, cultural and technological changes and the global industrialization and ultraprocessing of food, findings related to nutrition and mental health are connected to some of the most pressing issues of our time. The research is also of relevance to matters of biophysiological anthropology. We explore some aspects of a potential evolutionary mismatch between our ancestral past (Paleolithic, Neolithic) and the contemporary nutritional environment. Changes related to dietary acid load, advanced glycation end products and microbiota (via dietary choices and cooking practices) may be of relevance to depression, anxiety and other mental disorders. In particular, the results of emerging studies demonstrate the importance of prenatal and early childhood dietary practices within the developmental origins of health and disease concept. There is still much work to be done before these population studies and their mirrored advances in bench research can provide translation to clinical medicine and public health policy. However, the clear message is that in the midst of a looming global epidemic, we ignore nutrition at our peril.