Treatment options for gastritis and peptic ulcers may include medications to reduce stomach acid, antibiotics to treat H. pylori infection, acid blockers, antacids, and lifestyle modifications such as avoiding trigger foods, reducing stress, and quitting smoking. In some cases, surgery may be necessary to treat complications or severe cases.