I have no opinion on medical matters.
I can share my experience, though.
I had severe anxiety and depression before my drinking, during it, and when I got sober.
The AA programme relieved both, gradually, to the point where I had and have no anxiety or depression. How?
The anxiety and depression stemmed from my beliefs, thinking, behaviour, and specifically the unresolved past.
I resented, hated, or was bitter towards a large number of people. I relied for my identity, value, and purpose on the vulnerable things of the world: reputation, self-image, material security, relationships with specific others, and the achievement of ambitions. I spent a lot of time thinking depressing and anxious thoughts. I focused largely on the negative. I was hostile towards others. I was vain and conceited. I had behaved inconsiderately towards a large number of people and had not patched things up. In short, my life was focused on what I could get out of it, not what I could put into it, and I saw other people largely as instruments in my plans.
The above will make a person anxious and depressed.
The above will make a person anxious and depressed.
I was convinced, though, I was 'nice' and I was not responsible for any of the above. It turned out that I am indeed responsible for my beliefs, thinking, and behaviour. I was and am a great person, fundamentally, like everyone else: I was just living wrong. Through the Steps, all of this changed. I forgave everyone for everything. I started to rely on a Higher Power rather than the world. I made amends for everything. I switched from being concerned with my welfare and others' conduct to my conduct and others' welfare. The depression and anxiety dissipated.
The clearing out of my beliefs, thinking, and behaviour is an ongoing process, but I've been in the 'safe zone' for a long time.
Believing, thinking, and acting differently changed my whole experience of life.