The symptoms as mentioned in your post can be due to:
1. Irritable bowel syndrome
2. Any chronic infection in the Gastrointestinal tract.
3. Increased gas production due to dietary factors or allergy to certain food products (as you are suspecting).
4. Hormonal factors like Hypothyroidism
5. Inadequate hydration status & electrolyte imbalance
in the body.
6. Stress, inadequate sleep, etc.
Though symptomatic relief can be obtained with Pantoprazole
& Dicyclomine preparations, the underlying cause needs to be treated.
So, kindly consult a Gastroenterologist
& get a proper clinical examination done.
Investigations like stool microscopy & culture, Ultrasound scan of abdomen & colonoscopy
will be helpful.
Till then, maintain adequate hydration & take soft, non-spicy diet.
There is no need to worry...you will be fine.
Wishing you a good health & a speedy recovery
Thanks & take care