Your symptoms are like the start of a panic attack, what made things worse the fright, It frightened you and your pulse was racing because you were actually frightened of the un-known. Then you begin to dehydrate, thats why when they put you on a drip you began to feel better, it was saline to re-hydrate you. Also being in a hospital you felt safe, you knew there were people there to help,
If it happens again you'll have a bit of knowledge and talk to yourself "OK Jane I'm going to be fine, this is nothing to worry about," then take in some deep breaths, and sit down, 10 mins & you'll be fine. Its a case of mind over matter lovely.
I've been there believe me. -- Good Luck.
jem