If you are experiencing any symptoms like vomiting, loss of appetite resulting in weight loss and heartburn, get in touch with your doctor at the earliest. Bacteria which cause stomach ulcers have to be treated with antibiotics. Take a look at foods to avoid stomach ulcers: