The "thrill" could be from imagining feeling better. So, since you believe hurting yourself will make you feel better, your mind ends up associating the thrill more directly with the thoughts of SI than with the possibility of feeling better.
Just my theory, hope it helps.