First, be assured that you aren't falling apart. Panic attacks will cause a variety of physiological symptoms, to include those you describe.
A problem with panic attacks is that, after the first one, we become so obsessed about having another, we actually create the conditions for another one to occur.
I believe your problems are situational and temporary in nature, however, I still recommend that you see a professional mental health provider, so that a complete and thorough evaluation can be completed and that appropriate medication(s) may be dispensed, if necessary.
Like your teacher told you, "Take a few deep breaths" and relax.