Can anyone relate? How did you cope? Did you change careers and become happier?
You may not have to change careers because odds are it's your environment i.e. "job" that's toxic. Once I started doing independent contracting it felt like this massive emotional burden had been lifted that allowed me to have energy to focus on what really mattered to me. I'm doing things now that I thought I would never be capable of because I didn't have a formal background in fields I ended up not pursuing in school but wanted to. So now instead of learning new programming languages I study other topics like mathematics and chemistry.
I think the act of making a "career" or business out of something you enjoy in some degree makes it drab and boring. The best minds in any scientific or technical field aren't "professionals", they are always in a constant state of "play"--which is true for the most prolific programmers that I can think of. So my advice is to give yourself a license to just have fun! Don't guilt trip or second guess yourself: go by that textbook or go take that course etc you've been too afraid to read or attend.
Turns out I'm not a very good developer, probably average on a wider scale, maybe a bit below that and certainly bottom teir when it comes to highly tech minded contexts, such as here on HN. And frankly, I dont care for much of it at all. I dont hate programming i guess, and while I rank myself poorly as a developer, I'd same I'm ok as a hacker, meaning I can dig my heels into a problem I'm interesed in and "hack together a solution" from nothin, mostly for the sale of wanting to do it. Its very rare that I'm exposed to a problem that I can get engaged in, but when I do the spark returns.
OTOH no idea what else I could reasonably do. Most careers are going to be plauged by the reasons that turn me off of programming. There's a handful of things that interest me, but all stuff that is out of reach because of education reasons and I make too much money to afford going back to school (but to little to self fund). Its also hard to tell where my intellectual ceiling is and if I'd even be able to work on some of those things anyway.
^(and better: non-computer, so there's no 'I could write a script to do this faster' or 'I have so many better ideas for a site/program that would do this better' temptation)