Understanding the reasoning behind addiction to self-destructive behaviors is the first step in breaking that addiction.
Activities that cause fear or pain can later become thrilling experiences.
Addiction to recreational drugs is an easy enough concept to understand, because drugs make you feel so good the second you take them. However, activities that cause fear or pain initially, whether positive or negative (e.g., self-harm, abusive relationships, marathon running), can eventually become enjoyable.
The importance of endorphins.
Endorphins are a morphine-like compound that are secreted by your body in response to stress. So, when you engage in self-destructive behaviors that cause you fear, pain, stress, etc., your body releases endorphins, which numb the pain you are feeling.