There are many people who suffer from excessive gas. This gas build up can cause a variety of issue and heart pain is one of them. I think the best way to avoid this problem is to avoid oily food and avoid excessive eating. Moreover, eating foods like yogurt can also help to overcome this kind of problem. I have suffered from this issue and I can confirm that yogurt help when it comes to gas problem. Having said that, avoiding food like bubble gum and fiber-rich foods can also prevent bloating to some extent. Avoiding spicy foods can also prevent stomach acidity and gas.