From what I understand the cause is an automatic response to lower the blood pressure, so as to limit the blood loss.
Blood phobia psychological treatments developed by behaviourists give that indication to patients during the exposure to blood and blood related experiences during the treatment. The name of the therapy is exposure therapy and it's the one with more evidence supporting it for treating phobias. Yes, its about "facing your fears" but it's done in a gradual way. https://www.apa.org/ptsd-guideline/patients-and-families/exp... Therapists found ways to prevent the fainting during the blood-phobia treatment, allowing the graded exposure occur.