It's like a loop that nearly impossible to break out of, and even when you do returning to a comfortable life rhythm will take considerable effort, too.
Also, for a lot of people there is no rock-bottom, you'll just keep slipping deeper and deeper.
So, my advice is to ask for professional help—which I realise is one of those "easy to say; hard to do" type of advices, but try to ask for support from your friends—and try discovering something new, which can be completely outside of IT!
Another thing that you can try—which is very effective, but doesn't require you to dish out money is downloading some CBT (Cognitive Behaviour Therapy) tracks or guidance applications. There is quite a few of them and they can help a lot (although they might not be as effective as with professional guidance).
Also, something "odd" which I can also recommend is 7cups.com (which is an online therapy platform; you can have 1-1 sessions or group sessions, it's great if you need to just talk to someone). You can even try becoming a guide (called a "Listener"), helping others can also help you (and this especially true, if you're an extrovert).