I'm not as articulate or insightful as other commenters on HN, and I don't have any silly platitudes to lift you up, and even if I did, it wouldn't be help in any way. So please forgive the rambling and stream-of-consciousness that follows herein. Just like yourself, I also created a throwaway account because my HN nick is my handle elsewhere.

You're in a trough - call it depression, a slump, burnout, whatever. We all go through it - there's no defined beginning and no defined end. Some may experience just a brief episode once at some point in their careers and are ever so lucky to avoid the personal side effects, some may revisit it multiple times throughout life, and some have remained stuck in one big trough from since as far back as they can remember. Sometimes troughs are forks of consequence, sometimes they're a result of our personal demons gaining the upper hand, and sometimes we're just plain unlucky.

I can assure you though, that you are most certainly not alone.

Here's a confession: up until a few months ago, I was near the lowest point of a very deep and seemingly pitch black trough which lasted roughly three years. Just like yourself, I was long-term unemployed (I'm an independent contractor, so technically I still am unemployed) and in my job hunt, I was branded "unhireable" (actual word from recruiter) - chalk it up to my pursuing too many fields when younger, not dedicating to one job, or not choosing to build a brand (e.g. projects, blog, twitter, blech). At times, I felt as if I were at the top of a Silicon Valley blacklist for reasons unbeknownst only to myself. And, similar to your situation, I severed many personal relationships, some irreparably - all the stories of success or excess that I saw on social networks, on blogs, on HN etc etc etc were magnified by my selective attention and self-doubt to the point that I became completely withdrawn and questioned what good I was to myself, let alone my friends. Shame, depression, paranoia, helplessness. These are all attachments that I couldn't shake. Every minor success, I'd scrutinize its origins, wondering what strings were attached and how soon before I'd manage to fuck it up.

Here's the scary part. I can't tell you that it will get better soon, because frankly, that's an unfair expectation, and there's also a chance that it won't. You will hit rock-bottom at some point - for me, it was last October after I also moved in with family. All that negative energy and those feelings of limited self-worth, as intense as they may seem now, will multiply and your already tired and rewired mind will conjure deep-edge thoughts that'll frighten the shit out of you, and lead you to drastically change your life in more than one way. And you'll only know that you hit rock-bottom weeks or months after it happens, when progress leads to forgetting your worries and you occasionally have time to stop and reflect upon the relative shittiness of days past.

Why am I saying this? Because you need to know what you're in for when it looks like things can't get any worse.

You can delude yourself and listen to those who say that a positive attitude, networking, determination, and patience is all you need. But brother, I can assure you that amounts to nothing when rejection after rejection will tear away at the widest of fake smiles and the chipperness of upbeat conversations you try to have with recruiters.

There's no sense in assigning blame to your current emotional state or dwelling on any one of several mistakes you've made in the past. Even the best decisions you've made could've turned pear-shaped otherwise.

The good news, however, is that if you remain strong, you will eventually get out of your trough. You're obviously seeking the right path by telling us your story and looking for guidance, which takes exponentially more courage than the alternative.

Here's some general advice, taking cues from what I did to emerge from the dark. YMMV:

* If your passions lie outside web/mobile, then don't pursue web/mobile. I hated what I was unfortunately good at. I pivoted towards new disciplines in my consulting practice that both challenged and interested me, and which were at the very edge of my sweet spot in terms of expertise. I found new work by lowering my rate and targeting more forgiving clients, which took a lot of time (and a LOT more rejection).

* You shouldn't worry about pay or the caliber of company at this point. Just find the right environment that you believe you'll thrive in and immerse yourself for a few months or a couple years. Compensation should matter nothing to you at this point. You obviously can't get the pay you want, because you're not qualified. Nor can you pursue an internship or entry-level role in a high-growth placement, because you lack the vigor and momentum of a younger alternative. Any port in a storm - take what you can get, and make it better.

* Don't feel that you have to reinvent yourself by learning a breadth of new skills. Build yourself anew atop the many things that you do like or are good at, and dedicate yourself to being really really good at one thing (basically, affirm your "t-shape" in HR 2.0 parlance).

* If "selling yourself" feels wrong, that's completely normal. It's called humility. Many today lack it. It's a curse professionally, but often a blessing personally. Take stock of what you have done really well in the past and what you genuinely want to do, package it into a story, recite it recite it and recite it some more, and the "selling" will be natural instead of forced and disingenuous.

* I don't have the context, but I'm sure you were rejected by the burger joint because you're of far greater value elsewhere - you don't know it, but they did. That, and based on what they see in your personality and background, you're unstable, unreliable and can't follow orders - three red-flags. Why should they take that risk, regardless of how smart you may be compared to the average line cook? Count your blessings - that would have been a dead-end.

* As ryanmolden points out, your serendipity is not in your immediate surroundings - go find it. Get out of the house and busy yourself as much as you can. Find venues that challenge you or provide fulfillment. For me, it was hiking the East Bay trails and volunteering at Habitat for Humanity GSF - anything that would create enough fatigue to displace my negative energy. More importantly, establish a sense of routine and discipline - I did this through daily gym sessions, teaching myself Python (have a LONG way to go), learning Spanish and refreshing my Calculus. Above all, don't tie any expectation of success to these goals (e.g. if you improve your Haskell, your chances of employment improve) because 1) frustration will likely follow from time seemingly wasted and 2) you're learning new things for the wrong reason.

Again, YMMV. Understand that there's no prescribed way out of any trough, and this will take time. Also remember in the short-term what what you're experiencing is perfectly normal. You'll be a better person once you emerge from the dark, and hopefully you'll be set on the right path for the long-term.

Most importantly, stay strong. I'm seriously wishing the best for you.