Sounds like you're first problem has a 'plan' (help, diagnosis and med's)
You need to battle the self medicating as a separate issue. What you are doing is just throwing gas on a fire. You seem to have completed the first step, admitting it's a problem. Seek help for that in the appropriate place, there has to be support groups for substance abuse where you live. It's time to stop using drugs and alcohol to dull the pain. I understand exactly where you are at. I had been sitting in the same chair you're in for 18+ years myself. I'm 2.5 years sober now, if someone told me I would be just a few years ago... I would have laughed hysterically. You can do it, you've already taken the first step...