I suffered from random anxiety/panic attacks back in 2013-2014. I couldn't tell you how long exactly this went on but it was easily months. Certain things seemed to make it worse, especially driving in my car. To make a long story short I inadvertently learned I had mono and that was the only thing I can attribute the anxiety to to this day. What I've learned about anxiety though is it's mostly psychological. A thought gets into your head, your mind latches on to it, and from that point on it snowballs into a panic attack. The best thing to do is to stop thinking before it gets to that point. Slow, steady breathing in addition to doing something to help take your mind off it. I would start cleaning if I felt a panic attack coming on or call a friend and start talking with them. This makes you think of other things instead of what is bothering you. Talking on the phone can help normalize breathing which can help to stop anxiety. It can vary between people, some hold their breath during anxiety and some hyperventilate and both of these in excess will make things worse. To stop a really bad anxiety attack that you can't seem to shake, fill a large bowl or sink with cold water, throw a bunch of ice in with it(it has to be really cold ice water). Submerge just your face in the bowl for as long as you can stand it(trust me, it won't be long at all).