Heartburn and indigestion brought on by gastritis may be effectively treated with the over-the-counter drug Gaviscon. It functions by creating a shield over the stomach’s contents to stop acid from irritating the lining.