I empathise with your friend's plight, and her exasperating struggle to get well. I've been similar in terms of having a life that others would consider pretty darn good but where you find yourself depressed to the point of being largely unable to function, no matter what treatment you try. I get it, it's profoundly awful, and the world needs to to better at dealing with it, and that has become somewhat of a calling for me now that my own mental health is improving.
But all my research and experiences support the notion that both one's experiences and one's emotional reactions to those experiences are crucial. This is why you can have some people living seemingly perfect lives and winding up depressed, and others living through war and oppression and coming out fine.
In your friend's case, the environmental factors could be: (1) pressure from outsiders to "keep up appearances", (2) the negative messages and images that proliferate through the media of war, poverty, murder, terrorism, climate change etc, (3) a world that offers so many options of how to live but little consistent guidance about what is best, (4) living in a society that can still be very difficult for women, due to career challenges, threat of abuse, paternalistic attitudes etc.
These are just hypothetical of course, given that I don't know her.
And for her to be crippled by depression in response to these or other stimuli would be as much to do with a difference in the way she responds to such things vs the "average" person.
But it may not even be unhealthy. Maybe her true calling is to work as a humanitarian helping the needy rather than doing what she's been trying to do, and her depression is her mind's way of making her realise she needs to make that kind of change.
Having gone through this process in myself and with others, when you dig deep enough, something like this always turns out to be there.
But my main point is that the mind does not and cannot function independently of a person's environment, and paths to mental wellness that really work (and they do exist), involve addressing both one's inner reactions to things and one'e outer environment.