Acidic foods like tomatoes and lemons, spicy foods, fatty foods, and fried foods could irritate your stomach ulcer. Coffee and carbonated beverages could also be irritating. Alcohol can worsen symptoms and should be avoided with an ulcer.