First, NO FEED! Stop all feeds and grains. The best diet for an ulcer horse is hay, and lots of it. Alfalfa is really good for ulcers because of it's high calcium content. If you can't get alfalfa hay, feeds 1-2 scoops of Alfalfa pellets every day (3 qt feed scoop, about 3.5 lbs per scoop).
Next, LOTS of turn out, preferably 24/7 with only stall time for "goodies". Turn out and free choice grazing or hay will help keep the digestive track in good working order. If you cannot provide unlimited turnout, then free choice hay and daily turn out are a must.
For treatment, follow whatever advice your vet gives. You do not want to play around with ulcers.