Hi there....you cannot control your gastritis with medications. It will require a strict diet complemented with oral medications. Regarding diet avoid spicy foods, oily foods, outside junk foods completely. Take plenty of water. Have 4-5 short meals, instead of 3 big meals. You can take pantoprazole 40mg once in the morning half hour before your breakfast. Do not starve fir too long.
Try this for 1 week. If you are still feeling better you can consult a general surgeon for further evaluation.