You shouldn’t feel guilty for ensuring your mental health.
When I was a kid, I was under the impression that departing any kind of job, be it through firing or quitting, would be an extremely dramatic, life-changing affair. To be fair, my frame of reference for that was mostly cartoons. It wasn’t until I quit a job for the first time that I realized that’s not quite the case. Sometimes, for whatever reason, a job just doesn’t work out. It could be a dramatic event, but more often than not, it’s just two adults in an office reaching a calm, mutual decision. And when it was done, I felt a little bad, sure, but I also felt pretty good.
There are a variety of reasons one would want to quit their job. Maybe the pay and benefits aren’t matching up with the effort you put in or simply aren’t enough to support you. Maybe the environment is toxic and directionless. Or maybe it’s just time for you to move on with your life. Society puts a lot of emphasis on employment, and tends to disparage those who aren’t actively employed at all times, but quitting your job won’t immediately reduce you to a sidewalk vagrant. The reason you quit your job is immaterial; as long as it’s a good reason to you, then it doesn’t really matter what other people think.
I would go as far as to say it’s important to quit a job that’s taking a severe mental toll on you. Even if you’re making decent money, it isn’t worth grinding yourself down into a metaphorical stump of a human being. If you feel as though your job is impacting your life negatively more than positively, you are absolutely within your right to get out of there. Don’t feel ashamed, you made the right call.