As Carnation suggested, check out the
FODMAP DIET. Download the info, track what you're eating and how your body reacts. My wife have been on this for years and it's definitely helped. Tracking is vital as all foods deemed negative may not be that way for you and the same is true for good foods. For example, cooked onions and garlic are fine for us but raw? Different story
And the opposite is true for tomatoes. We can eat raw tomatoes and be fine but tomato sauce. pizza etc. tear us up! Also take into consideration that it took a while for things to get to this point and it will take a while for things to settle down so don't go catastrophizing and feeding the dragon.
Check out the link, give it some earnest effort and I know you'll see some positive results. In the mean time, OTC remedies for digestive issues do help. So some antacid and anti-diarrheal remedies can help with physical symptoms.
FMP