I knew I needed to quit the particular jobs I was in when they got to the point where I felt like throwing up every morning from anxiety about them. The fact that it kept happening in each job I had as an adult made me afraid that was just what working was like, and that I'd never be able to not be miserable. I finally quit one a couple of years ago with no other source of income, no savings left, nowhere to live (I thought), and being certain that no one would ever hire me for another job because I had left a teaching job two months into the school year. My parents were furious, but I could not continue to live like that. Fortunately, my parents did let me come live with them, and while I was there I was able to recover and try to figure out what I actually wanted to do with my life. I ultimately found speech language pathology, which unfortunately required three more years of school. However, after researching it extensively and spending the rest of the school year working as a special education paraprofessional, I was confident enough that this was the right choice for me that it was worth getting student loans and living with relatives for three years. Fortunately, my grandma lives close enough to a university with a good SLP program that I was able to live with her. I'm still in my program now but I've already started working with clients, and I really like it. I've even found someone at my university who knows a lot about adults on the spectrum who is working with me to develop better self-advocacy skills and who will help me interview for better jobs, which was part of why I kept ending up in miserable jobs and being unable to do anything about them.
I never would have been able to do any of this while I was using all of my energy surviving those miserable jobs. It might be that there's a job that's better suited to you that you could find if you had the time and energy to investigate it, or there might be ways to modify your current job that you don't have the energy to see right now. If you're in a position to not work as much, you might consider using that time to recover and investigate ways to still work like you want to without endangering your physical or mental health. I thought it was impossible for me, but it wasn't. Alternatively, you might find other, non-job-related things you can do that you find valuable.