I have suffered from IBS for 10 years and I know how debilitating it can be. Here are a few things I would advise:
1. When bloated and in pain, try lying on your tummy for a while or going for a walk. Sitting makes it worse.
2. Wear looser clothing on days when it's bad as tighter waistbands can make it worse.
3. NEVER put off the urge to use the loo...otherwise you're asking for trouble. If you put it off you are likely to end up being unable to go, and in a lot of pain.
4. Exercise whenever you can.
5. Get yourself tested for food intolerances or allergies. A lot of people (myslf included, once!), guess that they should stop eating certain things, e.g. wheat, but they can be way off the mark. In fact it can be something completely unexpected causing the problem. Also, although salads help some people, they don't help me as my body finds it hard to digest raw salad products. Lightly cooked veggies are better for some people.
6. Definitely eat smaller and more often, and drink plenty of fluids. Warm drinks can help to get things moving when you think it's time to use the loo!
7. The medication my doc prescribed only worked for a limited period as my body adjusted to it. The second lot of meds also lost their effectiveness after a while. I have found it better to self-manage the situation.
8. I have found that home cooking upsets me less than pre-prepared meals and sauces. Time consuming, but I always cook extra so that I can freeze some for mid-week easy meals!
Hope at least some of this helps a little! Good luck