I've been there a couple of times, I've even had a suicide attempt at 17 and ended up spending 2 months in the hospital with kidney failure. But each time depression crept it on me again, I was better and better equipped to deal with it. The last time I was depressed towards suicidal (about 2 years ago), two things helped me: This book: http://www.amazon.com/Feeling-Good-The-Mood-Therapy/dp/03808... And a low-dose hit of LSD, which practically sucked me out of depression in one night (for the reasons outlined below). This was my way, you might need to take a different path, but speaking from experience, it is possible to get yourself out of this and then good things start to happen.
It will get better, just hold on.
The reason you're feeling like nothing works, is because you've forgotten what you've came here for. What this life is about. It's not about how well you write code, it's not about how many friends you have or how much money you make or what car/phone you have. What is it about then ?
That's for you to find out. That's how the hit of LSD or psilocybin (mushrooms) might help, but you need to know what and how you're doing it.
The other reason is the way you interpret reality and what you say to yourself every day. Details about this are in the book.
And some other ideas:
Stop everything, take a vacation and go on a trip. It's summer, go to a festival in the mountains or south to the sea, visit Paris or Barcelona or go to India. Do something you've always wanted to, but never had the time or resources to accomplish.