I passed out in a bathroom stall today..

ca
My period was super heavy as it was the first day of my period.  It caused me EXCRUSIATING pain I've never felt from a period before. I was at college, and as soon as my class ended I hobbled to the bathroom. I started getting really hot and lightheaded. Then my hands started shaking, I felt nauseous like I was going to throw up. I remember just slouching down in the bathroom stall and sitting against the wall, I know that's not sanitary, but honestly I felt like I was dying and didn't care at that point, I didn't know if I could stand anymore and I just closed my eyes and woke up a few minutes later. I hobbled to a vending machine and forced myself to eat a snickers and water bottle. And then felt AMAZING!!
What was wrong with me? I had a little bit of potatoes that morning but that was it, I was also dehydrated so maybe my blood sugar was low? But I feel like it was brought on by my period? Maybe it's PCOS or something wrong with my hormones? I feel fine now, but I would really like to know what happened to me because that was so scary:(