Dealing with failure and depression

Hey guys

Like many others here I started IM because I was depressed, I had just dropped out of school, and I wanted to do something with my time when I wasn't at work but….
I keep on failing at everything I do and it's really depressing, especially when everyone I know is going places while I'm stuck in the same place and by the looks of it, will probably be stuck in my deadbeat job for the rest of my life.

How do you deal with failure and depression?