I have the very same issue you have, though it only seems to affect me during the winter season, some guys suggested getting a light box that simulates sun light, I'm gonna have to try that out. Other than that, there isn't much you can do (as far as I know) to fix the problem in a blink of an eye, though doing some basic things like exercising, meditation, following a proper diet, getting enough sleep & cultivating positive thoughts & attitude will help you in the long run. Try talking to your classmate during the more severe points of those episodes, it's really the only distraction that's worked so far for me. You could also try vibrating your legs, or do other kinds of repetitive movement to release some of the stress.
It's not much, but I've not found a good solution for this problem yet either, but hey, at least you're not alone, we're in this together & we'll figure a way out of this mess. sometimes I have such bad days that I only show up for 1 hour, during which I have to excuse myself & leave the classroom every 10 minutes, just to calm myself down in the stairway, or the bathroom, look at the mirror & convince myself that everything will be fine, after that doesn't work, I have no choice but to say that I have to go & leave.