First of all, make sure that you've properly cleaned and taken care of the cuts. Don't let them get infected.(I'm sure you already know that.) Bandage them with care.
Talk to your (soon-to-be)boyfriend. Tell him what happened, say that you need him right now. If you two are close, he should be able to help calm the urges so you don't feel the need to hurt yourself. Reach out to him, man.
Do you still live with your parents? If so, if you have an okay relationship with them, reach out to them, too. Explain what you're feeling, your anxiety and your urges to self harm. Are you seeing a counselor? If not, discuss seeing one with your parents.
Work on relaxation exercises. They help me a lot whenever I get the urges, you can message me if you want some more info on them, but one in particular that works on me is one similar to 'biofeedback', which is basically taking a moment with yourself and listening to what you're feeling, what you need, where there's tension, and relaxing your muscles. Just get in a comfortable position, and feel each muscle from your feet to your neck relax individually, feeling yourself become heavy. Gain a sense of self, what do you need right now? What needs are you trying to meet by using these self harm techniques?
Message me if you want to talk more about any of this, alright? I know how it feels, and I really hope you get through this soon.