For quite a long while, I had anxiety attacks while I was married to the 3rd ex. Looking back, I can see that my anxiety was at least partly caused by 3rd ex, but it was very scary and inconvenient while it was happening.
I did get medication for an emergency, but I never had to use it. Instead I eliminated everything from my diet that contained caffeine, chocolate, or sugar, and stopped using decongestants that made me anxious. I learned the earliest, earliest warning signals that an anxiety attack was about to start, and used careful breathing control to stop myself from hyperventilating.
I learned that the WORST thing that could happen to me during an anxiety attack was that I might pass out from hyperventilating...but also learned that would be a GOOD thing, because your breathing resets to normal after you pass out. I think just knowing that took all the fear out of it for me.
And last but not least, I learned I could actually function while having an anxiety attack. I once drove my son to the doctor while in the midst of one, and no one even realized it at the doctor's office! I kept telling myself that people actually PAY for recreational drugs that make them feel as messed up and unreal as I felt on that day, and thinking that helped me to cope.