Green vegetables also contain significant amounts of magnesium, a mineral that strengthens gastrointestinal muscles. Your diet should include probiotics such as yogurt, kefir, miso, sauerkraut and other fermented foods. Kombucha may prove particularly advantageous, as preliminary studies suggest it may aid in healing stomach ulcers.