My thesis:
I think that though anxiety and depression must have always been around in some form, in certain ways that people nowadays are more susceptible to anxiety and depression than they were, say, 2000 years ago, even though material conditions are much better (to varying degrees around the world, of course).
I have a few reasons for thinking this. For one thing, when so much effort and attention has to be given to eking out a meager physical existence, I feel like there isn't much room for depression (as separate from unhappiness or misery) or anxiety to develop, at least to debilitating degrees. There was terrible inequality, but for the general masses there was more homogeneity. If everything around you has the same difficult living conditions, then you probably won't feel too bad about yours. Quite the opposite nowadays where there is a lot of competition and comparison and all the negative feelings that can stem from those things. People's paths in lifes were more often paved for them from birth. Nowadays people have much more freedom, and with freedom can come depression and anxiety.
Another reason is feel that people's horizons and perspectives were much more restricted. The status quo was much more willingly taken for granted and much less often questioned. The way things were more tended to be seen as the way they should be. Nowadays that is not the case and it is plain to see how the disparity between what is ideal and what actually is in reality can contribute to depression and anxiety. Of course people's world views are much different. As is generally known before they were more constrained by the spiritual and religious beliefs of their society. Now that is not the case at all. People more often nowadays live in an existential nightmare. They can contemplate and face the world and the universe in ways that prove to cause a lot of emotional distress. This is of course hardly a novel insight.
I also feel that senses of belonging and community were much stronger back then. A feeling of isolation and alienation can easily contribute to depression and anxiety.