Please don’t be too hard on yourself!
I had surgery 7/23, and I still have occasional moments of lightheadedness when I’m exercising. The first time it happened it was much more like you described. I definitely thought I was seconds away from fainting. I stopped walking immediately and eventually made it to a bench. It took me a while ( hour or two) to feel back to normal. I started carrying lifesavers around with me in case it was my blood sugar dropping, but I actually think the issue was my that my blood pressure meds needed to be adjusted. My PCP has reduced my blood pressure meds, and that has helped. So that bit of near-fainting weirdness wasn’t actually an indication of something terrible.
As I said, I still will occasionally get the lightheaded feeling, but I notice that feeling much sooner. It has never been as bad as it was that first time. I will either slow down (sometimes sit down), and I recover much more quickly than that first time. My PCP asked me to keep track of when it happens, record my blood pressure and in my next follow up in a couple of weeks I’m betting my blood pressure meds will be reduced again.
It sounds like you had a really long day. Maybe you needed food, maybe you needed a rest, or maybe it’s time to check in with your primary care about any meds you take. I know it’s frustrating and irritating and frightening, but you can do this!