If it's stomach ulcers have you had any blood tests for helicobactor pylori which can cause them to recur?
Stress is a big player. Try to avoid stress and try things like massage, yoga or meditation. Drink lots of water, get plenty of sleep and exercise.
A high fibre low sugar diet is advisable as is avoidance of caffine (inc cola), alcohol and heavy meals which can increase your stomach acid. Smoking should be avoided too. Also avoid too much milk, pepper, spicy and acidic food.
Try eating a number of small meals a day eg 5 rather than say 3 large ones.
Yoghurts and cabbage (esp cabbage juice) are good things to have as are yams, apples, celery, cranberries, broccoli and onions and green tea.
You can get papain supplements (aka carica papaya/vegetable pepsin), deglycyrrhizinated licorice (DGL), evening primrose oil, vits A, E & C.
Do you take a lot of painkillers as these, esp cheap ones can irritate your stomach lining. Other medications such as over the counter antacids and anti inflammatory drugs can make them worse too. Never take aspirin or analgesics or vit c on an empty stomach. Only take painkillers and such when really necessary.