Sounds like it could be a panic attack: http://en.wikipedia.org/wiki/Panic_attack
(Note: don't rely on Wikipedia for medical advice, of course... just take it as an overview of the subject!)
I used to have similar experiences with some regularity. I never did seek medical attention as they were always short and didn't seem to cause damage, just the temporary discomfort of experiencing them, so I got into the habit of just waiting them out. I think I got them most often when I was undergoing major changes in my life or my environment - I used to get one sometimes when I would come home from school on winter/summer breaks, or sometimes I would get them mid-semester when my workload was shifting to new projects. Some sort of situational/stress triggers I guess.
Lately they seem to have subsided and maybe even stopped completely - I can't remember having any panic attacks at all for at least the last 6 or 7 months, maybe longer.