I was at my first ever Taekwondo (martial arts) class today and I happened to join on an intense exercise day. I pushed through it (which I am very proud of) but there were 3 times in the hour-long session where I had to sit down and take a breather because I was so dizzy that my vision was going black and my hearing was going funny, and I felt extremely nauseous. 

The third time was definitely a panic attack as I had to leave the room and sit down and cry because I couldn't breathe without making that "heaving" noise that someone makes when hyperventilating, but the other two didn't seem to be accompanied by feelings of anxiety. This has never happened before and it got me wondering whether this is just a side to anxiety that I hadn't encountered previously? I also didn't exactly eat enough today but that rarely results in even mild dizziness, just lethargy.

I definitely plan on going back but I don't want to go through those intense dizzy spells again. Is this anxiety related? If so, how can I prevent it?