I'm sorry to hear. I can definitely sympathize with what you're going through and currently recovering myself. This is just my perspective, of course.
The hardest thing to get past, and the first one I encountered, is the very real sense that what I'm doing right now is a mistake or a poor fit or below me or not enough of a challenge or etc, etc. When I'm in that burn-out mode, like depression, what I see and feel is through a particular lens. So maybe it's not that bad or maybe there are parts that are enjoyable or maybe I can make it work but when I'm in it then all of that falls away. The first step for me was to realize that I can't really trust my brain to give me an active picture when I'm rushing from thing to thing and hate every minute of it.
So my way out was not to make any rash decisions but to figure out an escape plan, even if it's temporary. I've been freelance for 10 years so I was able to pare down my projects and stop taking on new ones. I'm down to basically a single client part-time and everything new that comes in the door gets referred to someone else. I've deleted all of my various Trello lists of possible businesses to start and OSS to create and contribute to and unwritten blog posts. If I'm at a computer then I'm working with that one client. If I'm not I'm playing with my kids or riding a bike or building something in the garage.
The reduced stress, reduced time in front of a screen, and less demands on my time are very slowing starting to add up to what feels like recovery. I can trust myself a little better and have been surprised by what bubbles to the surface as important to do. It becomes easier to say no and enjoy life a little more and make better decisions. I feel like I've still got a long way to go but I don't dread my keyboard anymore.
For me, the pressure of "make a hugely important decision about your life right now! you're running out of time! you hate every minute!" was immense. It just felt like this always-looming thing that I had no answers to. What company to start or join? What idea to build? What person to meet? WHAT NEXT?!?! Once I started letting go of that question and just focusing on the absolute basics - spend time with people, work enough to pay the bills, get some exercise, eat well - then I become more competent to answer that question. It's like trying to do your best work at 8pm after a 12 hour day. Just not going to happen.
One more thing that I found can be tough but helpful. Regardless of what you're doing at any given minute, charge yourself with doing the best job of it that you possibly can. Not just for you but for those around you. Even if you're fixing spaghetti CSS or washing dishes or driving or cooking or anything else, tell yourself "I'm going to do this thing the best I possibly can right now." Good things will happen as a result but concentrate only on the action itself. I've found that I enjoy what I do far more, regardless of what it is, if I stay really present and let go of whether the task is enough of a challenge or enjoyable.
Hope that helps. Good luck out there.