You did the right thing for yourself. People can not handle high stress 100% of the time, or even 50% of the time without some downtime.
Some jobs are designed for burnout. You just figured that out and left one.
Most of us can handle some stress. But we need time and community to take care of ourselves. You need to sit down and de-stress with your co-workers. They need to know you when you’re not stressed so that they can bring you back to that less stressful state or so that they can cover for you when you’re at your limits.
That level of camaraderie in the workplace is essential for your mental stability and performance.