Thanks for writing your query.
After reading your post, it seems that you might be having bleeding in your gastrointestinal tract and needs urgent medical attention.
I would advise that you should get yourself clinically examined and investigated.
Following investigations may be helpful :-
2. Complete Blood Count
( CBC ).
You should take an antacid like Omeprazole
40mg once a day before meals.
Antacid in gel or liquid form is also helpful.
Following precautions will be helpful :-
1.Avoid spicy and oily foods.
2.Avoid being empty stomach for long periods.
3.Avoid mental and emotional stress.
4.Avoid smoking and alcohol, if any.
5.Avoid self medications, especially pain killers and steroids.
6.Drink lots of water daily.
Further medical management can be planned after knowing the reports of the investigations.
I hope this is helpful to you.