I can't even begin to count the numbers of people in the rooms of AA who got sober and their mind cleared up ....they were depressed. Probably unknowingly they were self-medicating with alcohol to treat the depression.
The good news is that once they were sober they started taking care of themselves: went to their doctors and therapists and were prescribed medications for their depression. It's a win win situation in recovery....