I guess the blood has come from a gastric source such as the stomach or one of the pipes into it or immediately out of it.
This might be a symptom of something potentially serious or even life threatening - a perforated ulcer can be very serious, for instance, and if untreated can lead to a very painful death, though I imagine it is your body's way of crying out for help.
Your stomach - your gastro intestinal tract has been designed by nature to perform its functions in a certain way and has spent thousands of years evolving in order to carry out that function quite efficiently...
Its function of removing around 1500 (summer diet) calories from a deal of dietry fibre and other junk and convert this into energy in various forms, not just to keep us alive, but also to power the body in all its maintenance tasks to keep it healthy and running sweetly cannot be mucked-about with without negative consequences and I think you have just had one of those...
Your gut needs the soft scouring of dietry fibre to keep it healthy, the ingestion of probiotic foods to keep the gut flora healthy and the right balance of other foods to keep everything ticking-over nicely - including the production of all those hormones and enzymes and other chemicals that do various jobs, including helping us to feel well and happy...
In addition to deliberately starving your body, you routinely cause it to shove highly corrosive stomach contents back up your food pipe is just asking for the sort of trouble you just had...
Psychiatric help is exactly what you need and if you want to live much longer it is definitely your problem!
Bipolar isn't insurmountable, self-harm isn't insurmountable and the anxiety isn't insurmountable, but the depression is going to be very difficult to treat if you don't eat (and digest) the sort of diet your body needs and has spent thousands of years evolving to deal with and until the depression is controlled the anorexia and bulimia will be almost impossible to overcome with any long-term success!
Some of your troubles are probably aggravated by your age as the rewiring of your brain naturally occurs during the early teens to the mid-teens or shortly after. If your unhealthy lifestyle has prevented or stopped your periods you could be forced into an early menopause and have osteoporosis by the time you are in your early 20's...
Not a pleasant prospect...
I ask again: do you want to live? Do you envy those who are enjoying their teenage years and optimistic for the future?
You too could have a future with help but first you must decide whether you want to live or whether you want to continue to insult your parents, to insult your family and friends (if you have any) and God or the creator (if you believe in such things) by abusing your body by committing suicide in this way?