Tumors of the oral cavity, pyorrhea or pus in gums and Vitamin C deficiency can cause bleeding from
mouth, which if ingested can result in vomiting
The other possibility is that you are coughing up blood. This can be due to bronchitis or pneumonia, lung cancers (especially in smokers), tuberculosis, bronchiectasis, pulmonary embolism, or fungal and other infections.
Discuss these possibilities with your doctor. A comprehensive investigation is required keeping all the points in mind.