I spent three years of my life on an island doing nothing recovering from a mild case of burn-out and the next 15 years after that on making sure it would never happen again. It scared the crap out of me to go from being very active and focused to being unable to get myself out of bed for any reason at all. But after a while things slowly got better and as I got more tuned in to the root cause I managed to avoid the kind of circumstances that led to it better as well. Being financially more successful than before also helped a lot.
One thing that made a huge difference during those three years was that instead of doing mental work I did a ton of physical work, which served as some kind of distraction and helped me to sleep by being physically tired, rather than to lay awake all night thinking about problems.
I hope this helps, you can google my blog and the term burn out and there will be some more writing about this. Hang in there, you'll make it through, especially if you are open to reflection.
Finally: your total repulsion for the software industry is probably a commonality with everybody that has been in it long enough, we have these amazing tools and we build total crap with it, hard not to be frustrated.