I think that all the problems you have described so far describes one very important thing that gives a meaning to life. And that is feeling that you are needed, feeling that you are important, if not to the world then at least to someone and somewhere.
Naturally humans tend to be egoist. It's a protective thing. We have to pretend that we are important or else what are we...?
But this can have a drawback when you experience a slump such as yours. Since we are egoists, we expect people to naturally need us, to naturally want us. However what happens when suddenly it feels as if naturally no one wants you? Because the truth is that people don't naturally want you or love you or need you, it's something that you gotta make happen.
Obviously your ego will prevent you from doing this, from going outside, from making connections that fulfills these needs because according to your ego you've already worked so hard, done so much, that they HAVE to want you and need you.
But you know this is not true. So there are ways to get out of this slump after you realize this.
What you need to do is make those connections and make yourself important and needed in another person's life.
How to do this?
My suggestion: Start anew. Throw open your door, go outside and sit down. If not many people on your block, go to a park or busy people place. Look around, is there anyone who can use your help? Who can use you ears? Who can use your words? Stop thinking about your life for a second. Stop being an egoist for a second. Think about that other person and what you can do for him/her.
Technically, this is all theory and stuff. But if your a scientific type of guy there was a recent study I read about that helping others makes us happy. (see source)
Also personally, I recently went through feeling betrayed by my friends so I am also looking for my own answers while answering yours :) And though it's shit to know that the people closest to you are not that great, at least we know that there are all different types of people and some will be worth it, finding them can be a bit difficult though, which is what the throwing open your door part is for.