I used to get them when I was in college and still feel one coming on occasionally when I'm extremely stressed. I was a psychology major and just happened to have studied anxiety in a class recently when it happened the first time, so I recognized it for was it was after it was over but that first one was absolutely terrifying. Ever since then I've managed to talk myself down when I felt one building by forcing myself to take deep slow breaths, repeating in my mind (or out loud if it helps) that I'm fine, I'm not going to die, it's just a panic attack, and finding some short repetitive task to do.
Like, if I'm in the car when it happens I pull over and switch radio stations and make myself really focus on what's being said for about 30 seconds, then switch again and repeat. If you're near a TV or computer or can pick up something to read doing something similar might help. Short moments of very intense focus on something arbitrary, anything you can think of, that can break up the OMGOMGOMG is the idea here. Keep in mind that you're basically trying to reboot your brain, but it requires a huge amount of concentration and the ability to distance oneself from the feelings even just a tiny bit to begin to take back control. Try something like this a couple of times but if it doesn't feel like it's working then see a Dr. If it's interfering with your life it's worth it to take medication or whatever else you have to do in order to get better. Best of luck.