Why did I almost faint out in the middle of nowhere? Didnt know what to do.

Hypotension. Hypotension may be caused by dehydration or something more serious. You need to see a doctor so that he/she can look at this in the context of your overall health. For example, if you treat it as dehydration and drink a lot of water, that would be bad if you have underlying heart failure. So see your doctor and get a plan.