I've been in basically the same mental state a couple times. What helped for me (unordered):
1. Different employer - over half the places I've worked have been toxic... and even some of the not toxic ones ended up inducing burnout due to corporate issues
2. Adderall - not a wonder drug... but helps postpone burnout
3. Getting a dog - wonderful for my mental health in general
For me at least, burnout was mostly a reaction to being in toxic environments. I think I could have gone straight from one of my terrible jobs, unproductive jobs to one of my good ones and been productive right off the bat.