What illness could this be?

Embarrassing, but I haven’t used the bathroom (too poo) in days. I get extremely bloated and I’m extremely gassy. Yesterday i had sharp stomach pains and pain by my ribs that was making my breath short and caused me to burst into tears at 5 am due to the pain. I ran to the bathroom but the pain got worst when I was on my feet. I sat in the toilet and hoped for anything to come out. Nothing did but pee and a gas. I tried going back to sleep. Woke up 20 minutes later due to the pain. This time it was worst. I ran to the bathroom again but while I was (farting) I began throwing up the food I had the day before. I cried out for my roommate. I probably looked like a mess but after a few cries she woke up and ran to me with lemon salt and water. I slept with her later on because I couldn’t stop crying. I felt better waking up today but now the slight pain in coming back. Why is this happening?