While spicy food or a poor diet is not a direct cause of stomach ulcers, certain foods and drinks can aggravate your ulcer and worsen symptoms. These can include coffee, alcohol, and foods that are spicy, acidic, or high in fat. A balanced, nutritious diet can help your ulcer heal and prevent future ulcers.