What is the best medication to treat gastric ulcer. My stomach produces much Gas and upper part of it got swollen up. Being using omeprazole?

Maybe not just ulcer. Feeling full of "gas" may reflect malabsorption of food (like gluten, lactose), intake of poorly digested food, or choosing foods known to promote gas (beans, fizzy drinks). Sometimes its more complicated--a stomach emptying too slowly, bacterial overgrowth syndrome, delayed intestinal function, partial obstruction from any cause, infection, rectum problems, &/or pathology outside the gut.