Distance yourself from the object you use to harm.
When i get urges, i keep myself away from things that I could possibly harm myself with. For example, stay on your bed and keep yourself under the blanket if you have to (make sure to breathe tho lol)
If that isnt enough to keep you away from harming, go to a different room like a bathroom where there arent much sharp objects. You can calm down there. (Personally, i've been in the bathtub a lot without water. Surprisingly, the coldness of it calms me.)
//
You could also try snapping hair ties on your wrist.
I don't know how your urges develop, but personally they come in bursts when im in an uncontrollable emotional state. I want to feel control over something, so i usually resort to self harm. I've been stopping this by instead drawing on myself. I use either a marker or a pen. It works for me :)