Thanks for writing your query.
After reading your post, it seems that you might have suffered from vasovagal attack. In this blood supply to brain is decreased for few seconds as a result of temporarily hypotension
. This may result in the symptoms as described by you.
You should get your blood pressure and pulse rate monitored.
Also take adequate healthy diet.
Also maintain hydration by daily drinking at least 8-10 glasses of water.
Whenever such symptoms start to appear, you should lie down with head end lower than the rest of body. This will help to regain your normal state earlier.
If the symptoms reappear, you should get yourself clinically examined and investigated.
I hope this is helpful to you.