According to the below websites bismuth salicylate (pepto-bismol) is the best over the counter medication. Antacids (Tums, etc.) may or may not be helpful. There are many more powerful 'under the counter medications' available, however. Since bleeding ulcers can be rather serious its important to have a physician check out your ulcer. Plus if your ulcer is caused by the H. pylori bacteria, as most are, the treatment success rates are high.
With an ulcer you should avoid caffeine, alcohol, smoking and NSAIDS such as aspirin, ibuprofen (Motrin, advil, etc) and naproxen. Some people's ulcers are caused by taking too many NSAIDS. NSAIDS interfer with the lining of the stomachs ability to protect itself.
We hope you find this general health information helpful. Please note however, that this Q&A is meant to support not replace the professional medical advice you receive from your doctor. No information in the Answers above is intended to diagnose or treat any condition. The views expressed in the Answers above belong to the individuals who posted them and do not necessarily reflect the views of Remedy Health Media. Remedy Health Media does not review or edit content posted by our community members, but reserves the right to remove any material it deems inappropriate.