Don't be too sad.
Stomach ulcers can mostly be treated v v quickly these days.
If it is caused by a bacterium called helicobacter pylori you will get double/triple antibiotic therapy for 7daysish and Losec/omeprazole/oesomprazole for 7-10 days and then you are likely to be cured literally overnight.
My mum had 1. Lost a lot (i.e. from size 18 to size 8) of weight due to GPs incompetance at diagnosing. Don't know how she would describe the pain. She suffered for years (3-4yrs between onset of symptoms and diagnosis at a guess - that is the first time I have calculated that). She basically vomited anything she ate by the end. GP was an incompetant arsehole and we took her in via A&E in the end. Endoscopy next day - started triple ABs & Losec. Was literally a new person 10 days later. Obv took a while to
build her strength and body back after such a period of severe illness.
Anyway - what I am trying to say is that even in v severe cases the right treatment can lead to an overnight cure (virtually). Many GPs don't even bother with he endoscopy for diagnosis try the drugs if it sures write it off - if not further investigations.