This is the answer I was inclined to give upon reading.
In addition to the importance of a sense of community and purpose (whether derived from children or not), I'd also like to contribute another lens through which to view anxiety and depression.
Things like lack of exercise, poor sleep, nutrient deficiencies, caffeine/nicotine/alcohol abuse, under-exposure to sunlight and nature can all cause physiological cascades which result in depression and anxiety irrespective of ones life achievements or circumstances.
And yet, at least in my experience, when feelings of depression and anxiety are present, the first thought is of life circumstances. If only I had a better job, better spouse, loving children, fame, fortune, I would not be anxious and depressed.
It's all too easy to latch on to a perceived lack of something in your life and blame it for any and all of your negative emotions and moods.
Like most human beings, I struggle somewhat significantly with a few specific regrets from my past, as well as the anxiety of navigating important life decisions as they come up.
When I'm feeling particularly anxious or depressed my mind is more inclined to ruminate over past regrets, or to dread upcoming life events. If I'm not present, I still often fall into the trap of believing that I'm depressed and anxious BECAUSE of these regrets or upcoming circumstance in my life.
What I've learned though is that at least for me, it's helpful to first attribute feelings of anxiety and depression to core fundamental needs like sleep, exercise, nutrition, sunlight, etc rather than to jump to and ruminate over regrets and fears.
I suppose a way to refer to a framework like this would be something like 'physiological anxiety and depression' vs 'circumstantial anxiety and depression'.
I believe it is totally possible to have anxiety and depression caused by issues to do with sleep, nutrition, substance abuse, and for your brain to trick you into believing that you're unhappy with your life circumstances.
This all being said, I in no way want to downplay circumstantial anxiety and depression and insinuate that they are not real. It's vital to have things like purpose, community, and to be generally satisfied and excited about ones path through life.