Once you start taking benzodiazepines like Xanax you have to go through very slow process of reducing dose usually changing to valium which is long acting benzo. This needs to be done under medical supervision.
Also it seems that you need antidepressant drug to get you out of the depression and stabilize your mood.
As for sleeping it is better to take medication like imovane which is specifically for sleeping disorder and does not induce physical addiction.
In summary you need to see psychiatrist or good general physician with knowledge in treating depression.
Remember that every 5th person will suffer from depression throughout his life requiring medical intervention.
Using benzos regularly, well, they are an addictive drug and stopping them can be brutal. Using them for sleep isn't what they were designed to do, and can lead to worse rebound insomnia. And as an anti-anxiety drug, they're a downer, which isn't the best thing for someone suffering from depression. I'm wondering if you've ever seen a psychiatrist, or just regular docs? You also don't seem to be describing something as severe as bipolar disorder, so I'm also wondering about your original diagnosis. I know you have problems getting help, but getting help isn't the same as getting good help. There are a lot of hacks out there. At this point, even if it takes time and is hard to do, you need good help. You also don't mention ever getting regular talk therapy. Did you ever do that? Here's a thing about cocaine -- stopping it can cause depression, at leas for awhile. Life just doesn't offer that kind of high normally, and it's a very stimulating high to boot. Could your quitting have been a factor in what seems to be a diagnosis not matched by what you're describing, which sounds like depression and depression-caused anxiety mixed in with what are regular very stressful things that happen to everyone in life?