The number one cause of ulcers is from lack of feed.
A horse is a browser. This means the gut is designed to constantly have something in it. When we keep them up and fed them hay, they stomach usually ends up having times when there is nothing in it. A horse has a very acidic stomach. So when the stomach is empty, the acid starts causing ulcers.
One of the best products I have found is GastroGuard from Total Health Enhancement (THE).
Hope your horse gets cured of the ulcer problem soon.