I find that what helps me most is to avoid foods that create trapped gas but if it does happen, walking up and down steps helps dislodge it. Also, a heating pad relieves the bloating. And finally, rubbing my abdominal area, starting on the lower right hand side where the appendix is located and the large colon begins. Then I rub up, over and down the left side. A nurse gave me this suggestion after my colon resection 9 years ago. I had severe gas pains. She said to walk, pace, rub and take deep breaths. All of it did dislodge it. But it took time. Of course that trapped gas was from being opened up during surgery. Now if it happens, it's never that extreme. The more active I am, the better I feel, not initially but in the long run.
I wouldn't know of a specific med to help you. Because again, I just avoid so many foods now. That I know give me trouble.