Panic attack in Math/ what would you have done?

Okay so first I wanna state when I have a panic attack I keep it to my self because I don’t wanna make a scene. and my symptoms, are usually shortness of breath, heat racing/ slowing down, shaking, my mind going crazy, and feeling overwhelmed. Anyway so we were working on this paper and all these kids were screaming across the room, saying I’m already done, and I felt really stupid. And the more kids that started screaming it the more I got anxious, so I was rushing and then I felt my heart rate just drop, and my mind was in a million places at once and I started freaking out in my mind. and I was so over whelmed and wanted to just run out of the class room at quickly as I could, but I just stayed in the room and the panic attack was probably for a good 7 minutes maybe less. Anyway do y’all think I should have walked out?