When people feel overwhelmed by emotions and don't have a healthy external outlet for them, they sometimes take it internally instead, and lash out on themselves as a way to feel any kind of release from the extreme feelings they're having. Emotional pain and physical pain are experienced both in the same area of the brain, so often times hurting yourself takes the focus away from the emotional pain and takes your concentration instead to the physical pain you're feeling.
Alongside that, when you harm yourself it releases endorphins, which can feel good or relieving or even have an emotional numbing effect.
Self harm is a process that occurs when we are especially stressed and acts as an outlet for that stress. In our brain, we have chemicals called neurotransmitters. These neurotransmitters are what control our emotions and actions. Self harm typically can be addictive. When faced with stress or other strong emotions, we tend to use whatever strategy has worked in the past.
As an alternative, you could engage in non-harmful actions that release the same endorphins. Things like holding ice in your hand until it melts, snapping a rubber band on your wrist, screaming into a pillow, or squeezing a rubber ball. These are safe methods to release the same endorphins that are released when you engage in self harm.
Did you find this post helpful?
Related Questions: Why do i get the urge to scratch myself/hit myself? I normally do it when my emotions raises.