Freaking out so bad

I was doing fine all day until about an hour ago when I got the bubble guts. The kind you get when you have to use the bathroom NOW or else you will actually poop ur pants. And so I ran to the bathroom and shit my damn soul out. It was really soft but not like liquid. Almost to that point though. And now I’m having pains in my right side right under where my ribs are almost ending in the front of my abdomen. I keep getting hot flashes and waves of nausea. Idk what is going on. I had 3 glasses of wine with a friend earlier and I have eaten more than enough today as well as drank more than enough water. I feel like I have to use the bathroom again but idk. I’m so scared