Stomach ulcers are a painful condition. The common cause of stomach ulcers is the bacteria Helicobacter pylori or H. pylori. Certain foods can help fight this bacteria. Here are the best foods for stomach ulcers.