Thank you for the query.
As human brain can stimulate stomach acid secretion, any stress or depression
can affect the stomach as well as the other parts of human body. Your symptoms can be caused by peptic ulcers indeed. Upper middle or left abdominal pain
radiating to the back can be also caused by gallstones or pancreas disease.
It seems that you should take care of both your physical and metal areas of your body. Upper GI endoscopy with Helicobacter Pylori
test should be done as well as full blood work, liver tests, amylase and abdominal ultrasound
You should avoid coffee, fatty foods, soft drinks, fruit juices. Start Magnesium 400 mg a day supplementation. Moreover, psychiatrist
consult seems to be beneficial at your case. SSRI medicines can be very helpful as you need to know that it is your right to feel well and you should fight for it.
Hope this will help.