These really sound like panic attacks. I'm sorry, it must be hard. But my suggestion is to go on with your life however, and not let this stop you. I think that it's the best way to overcome the problem, if you feel motivated enough to go.
Probably it doesn't help concentration, but I think that you can do it. You also said that when you don't think to the problem it happens less, if I understood well. So, maybe focusing on studying could even help

But I'd really, really suggest to see a therapist.