Stomach ulcers can be medical emergencies if you develop complications. Ulcers can bleed or break through (perforate) the stomach wall. They can also block food from going through the intestines. A trip to the ER is warranted if you have severe abdominal pain, your stools contain blood, or you’re vomiting a substance that resembles coffee grounds.