Passing out on the toilet once a year

So I’m a 21 y/o female with this really weird thing that’s been going on with me for a while and I’m curious if anyone has ever heard of this. So about once a year, my stomach starts to hurt and I go to the bathroom but end up passing out nearly the second I sit on the toilet. My hearing goes out, I can’t keep my head up, I start to sweat and get really pale and it lasts all of five to ten minutes. I usually have diarrhea when this happens as well. Once I gain consciousness again I instantly feel fine and like none of that just happened. The weirdest thing is that this only happens literally once a year and I never know when it’s going to happen. I have absolutely no idea what this is, what to do, or what doctor to even go to about this. I’ve never had any serious medical issues and wish I knew why this was happening to me. It’s happened about 5 times and I’d like to avoid a next time because those five minutes feel like actual death.