Sometimes I'll get similar self-defeating, hopeless thoughts when I haven't had meaningful interactions with someone for a while. The older the get the more I'm learning how central relationships are to my overall happiness. I'm not sure if what you're feeling is similar to what I've outlined, but it was the first thing that came to mind.

Hope you feel better soon. =)