In general: "studies have shown that the risk for serious mental illness is generally higher in cities compared to rural areas" [1].
For NYC specifically: about 60k out of America's 500k homeless people live in New York City, which is the highest homeless population of any US city [2]. The "large majority of street homeless New Yorkers are people living with mental illness or other severe health problems" [3].
These sources confirm what I think a lot of people have seen for themselves through personal travel and experience: mental illness/instability correlates with urbanization.
[1] https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5374256/
[2] https://www.statista.com/chart/6949/the-us-cities-with-the-m...
[3] https://www.coalitionforthehomeless.org/basic-facts-about-ho...