You mention that you have stomach ulcers and are vomiting
blood. It does not appear that your condition is well controlled at this point and you should make an appointment with your primary care doctor
or GI as soon as possible. It sounds like you are suffering from peptic ulcers. They can be caused by anything that would weaken the lining of the stomach of small intestine. Medications such as ibuprofen and other NSAIDS can weaken the stomach lining. Coffee and alcohol can also worsen your symptoms. Another cause for peptic ulcer disease is infection by a bacteria called H. Pylori. If it is cased by H. Pylori, you will need antibiotics. Peptic ulcers can cause abdominal pain and nausea. It can erode the mucosa causing bleeding which you appear to have. Peptic ulcers that are not treated properly are at risk of perforation which could be life threatening. You should make an appointment with your primary care doctor or GI doctor
as soon as possible. They may need to look inside your stomach with a camera. If you have further episodes of vomiting blood, you should go to your local emergency room. If there is a perforation, you would experience extreme abdominal pain. This could lead to infection since the abdominal contents will be outside the stomach.