Not quite four decades ago the Chinese settlement of Shenzhen was a modest fishing village, with a population of roughly 30,000. Today, thanks to a policy begun in 1979 that encouraged foreign investment, that sleepy community is a manufacturing hub with about 10 million people.

The success of Shenzhen is consistent with the broader development of China's Pearl River Delta. Once mostly agricultural land, it has become, according to a recent World Bank report, the largest urban area on earth. The cities in the region have a combined population of about 57 million—larger than the populations of many countries, including Canada, Argentina and South Africa. The region's development is a dramatic example of the global trend of urbanization. Now more than ever, we are living in an age when the health and fortune of billions are tied to the growth of cities.

In 1800 just 3 percent of the planet's population lived in an urban area. Over the next two centuries that proportion exploded, until, in 2008, it reached 50 percent. This striking demographic shift shows no signs of slowing down. The United Nations has projected that 66 percent of the globe's population will live in urban areas by 2050, with 90 percent of this increase occurring in Africa and Asia.

Shaping economies, the environment and more, the effects of urbanization are tremendous and broad-ranging. This influence is no less true for our physical and mental health. So as urban life becomes the norm for the bulk of humanity, we face a rising tide of mental illness—one we are already seeing in many places, including Shenzhen—but also opportunities to create cities that foster mental health.

Urban Hubs of Risk

From public hygiene, to the living and working conditions of urban residents, to exposure to infectious diseases and dirty air, cities exert a profound influence on all aspects of our health. This has been the case since well before our present era. When the industrial revolution brought a wave of urban expansion, many literary and social commentators, including Charles Dickens in the U.K. and Émile Zola in France, wrote about the dangers of population density, crime and pollution.

The public health community has collected decades of evidence linking urban living with an increased risk of diseases such as cancer, asthma, depression and overall rates of mortality. Among the first to suggest that cities also influence the workings of the brain were sociologists Robert Faris and H. Warren Dunham, who documented a concentration of schizophrenia and other mental disorders in the slums of Chicago. In 1939 they theorized that the social disorganization found in certain parts of cities could produce a sense of isolation in some individuals and lead to psychological distress.

Subsequent research has compared the mental health of urban residents with that of their rural counterparts. A 2010 meta-analysis, for instance, revealed that urban zones were associated with a 39 percent greater risk of mood disorders and a 21 percent greater risk of anxiety disorders.

Cities have also been linked with higher rates of post-traumatic stress disorder (PTSD). While U.S. crime rates have steadily declined in the past 25 years, the concentration of violence in some urban neighborhoods has driven up PTSD rates in those areas. The scope of the problem can be breathtaking. When researchers began examining patients at Chicago's John H. Stroger, Jr. Hospital of Cook County, which treats nearly 2,000 patients a year for traumatic injuries such as gunshots and stabbings, they found that more than 40 percent of the patients they screened showed signs of PTSD.

There are several mechanisms through which cities can influence our mental health. For example, by keeping large numbers of people close together, cities make it easier for anxiety to spread through densely concentrated urban populations, almost like an infectious agent. The name for this phenomenon is “social contagion.” Although the cause of social contagion is the subject of debate, it may lie in our human tendency to observe and mimic the behavior of others. For example, according to a 2011 review by psychiatrists at Columbia University, many New Yorkers who did not witness the September 11, 2001, terrorist attacks firsthand nonetheless reported anxieties typically seen among people who experience violence and trauma directly.

Although cities tend to have more resources—hospitals, wealth, places to buy food—than rural areas, access to these resources is not evenly distributed among urban populations. Lack of access, combined with stressors such as noise, crime and pollution, can strain urban residents, affecting mental health.

These stressors do not emerge by chance. They are the result of powerful structural forces—among them racism, education level, environmental pollutants and income inequality—that underlie the social, economic and even physical character of cities. Together they shape the conditions that create or curtail all aspects of health. Racist housing practices, for example, led to the residential segregation that concentrates crime in certain urban areas, to the detriment of both physical and mental health. And income inequality, particularly pronounced in cities, is a key driver of mental health problems for many low-resource households.

The Power of Structural Change

Given that more and more of us are living in cities, how do we go about building cities that can improve, rather than detract from, our mental health? The solution lies in rethinking some of the structural conditions that shape the social, environmental and economic aspects of urban life.

In August 2016 former U.S. secretary Julián Castro of Housing and Urban Development (HUD) unveiled a plan very much in line with this approach, proposing a regulation that would lower the permissible level of lead exposure in approximately 128,000 HUD-assisted units of housing in American cities. Lead exposure has been linked to depression and panic disorders, as well as other health conditions; tighter regulation and better monitoring of lead levels stand to help safeguard mental health.

HUD has also taken aim at residential segregation, recently releasing a new rule to bolster the often laxly enforced Fair Housing Act. Given what we know about the link between segregation and stress, changes at the level of policy have the potential to mitigate the effects of the unfair and harmful status quo. Whether such policies will continue with the Trump administration, which has vowed to reduce federal regulations across the board, is something to watch for.

China, home to some of the world's fastest-growing cities, is just beginning to recognize and grapple with the mental health risks associated with urbanization. In Shenzhen, mental health issues account for roughly 20 percent of the city's overall disease burden, according to a 2011 analysis by Dan Zhang and his associates, the highest reported rate of adult mental illness in any Chinese city.

Step one in confronting this issue is to bring mental illness from out of the shadows of stigma, which prevents sufferers and their families from seeking help. Fortunately, China has begun to address this with the enactment of its first national mental health law in 2013, which also calls for a range of reforms focused on better prevention and treatment. China and other urbanizing countries will also need to contend with the impact of pollution, crowding, substandard housing and other problems that come with rapid shifts of population into cities.

The stakes are high. The choices political leaders make now will determine the trajectory of mental health in cities for years to come. And given where most of humanity will be living, healthier cities mean, ultimately, a healthier world.