If you take a place like Japan, which has a higher population density than the US, you can see some potential psychological problems developing from being closely crowded in with other people. Japanese men will suddenly drop dead, from no obvious cause, but it appears to be linked closely to stress. That could be driven primarily by cultural causes, and not necessarily being packed in tightly in a city, but separating out those cultural influences caused by living so tightly packed together, is a bit difficult to do.
Studies have shown that people with mental health and/or behavioral problems (including things like autism) often show improvement in more rural environments. I think that a great deal depends upon how a city is structured, both in terms of park lands and society. Humans have spent the bulk of history not living in densely packed cities, but in rural environments, so there’s going to be a predisposition to such environments deeply ingrained in our psyche. We are, however, an adaptable species, so we certainly don’t need to fear living in cities. What I think we need to do, is figure out exactly the right mix of developed and undeveloped spaces which make us happiest, and then model future city planning off that information.