Hi Sirius. I'm sorry you're dealing with panic attacks and generalized anxiety. I have these problems too. Are you seeing a therapist or counselor? It can really help to work with a professional and learn some ways to better manage the anxiety. Also to try and figure out where it's coming from.
When I'm having trouble with generalized anxiety it really helps me to distract myself. Going outside for a walk is one of the best ways for me to do that. Writing in a journal helps too. So do breathing exercises. Or going online and finding ways to distract myself on the internet.
Of course if you're getting really anxious in class then I realize most of those things are not going to be possible. In that situation learning some deep breathing techniques might help most. You could do them at your desk and no one would notice. And hopefully it would calm you down a little.
I do think it would be really good if you were able to see a therapist and I hope that's a possibility