Sometimes pain is about control or it's about wanting to feel something, anything. Being a masochist (hurting yourself) could be a mask for deeper issues--or not. My suggestion is to get help from someone in the medical community that you trust--best of luck
Okay, as a masochist, self-punishment is only going to reinforce your thoughts of masochistic behavior. By snapping that rubber band every time you have a masochistic thought, you are rewarding yourself with pain... the very thing you crave.