Hon, you're describing self harm. It is what it is. It's what you are doing to possibly avoid something worse. Are you looking for someone to rationalize this for you? In my opinion, part of coming to terms with my own days of self harm was to face the truth that what I was doing was staying alive the only way that I knew how. Everything changed when I learned new coping strategies and I learned how to use them without thinking. I fortunately found a decent therapist and worked on me. Not easy but worth it.