4/5 weeks pregnant. Painful gas!

I have been bloating and gassy for the past two days. Its not very ladylike for me to rip it on the elevator at work but it seriously hurts if i dont pass gas every couple hours. Has anyone had this happen in the first trimester? What did you do? It is so embarrassing to have to step away from my desk for this.