To stop, is not an easy task. This behavior is not healthy, but I do understand. And yes it could end a friendship. Try something like hitting a pillow, or anything else on the list not to self harm.
To stop is not easy, but it is POSSIBLE!!! and that's all you need is possible.