I think you did the right thing. I know very well what it means to have a job that generates that kind of anxiety -- actually a panic attack, I suspect -- and it's just not worth what it can very, very quickly do to your mental and physical health.
I hope you can find a job with a little slower pace, where you won't be thrown in headfirst like you were this time. Wherever you go next, try not to let the place press you too hard. No matter how demanding or chaotic the environment may be, just operate at your own best pace -- don't let it push you over into panic.