If self harming actually makes you happy then why do you think you shouldn't do it? Maybe you realize that there are only certain aspects of it you don't like, like the social stigma attached to it or a tendency to overdo it and get yourself in trouble with it. Then it might be worthwile to check, if there are milder forms of self harming that evade the bad aspects of self harming like limiting yourself to less dangerous forms of self harm and/or forms of self harm that cannot be detected by others.
On the other hand, if you actually don't want to self harm any more, because you don't like the self harming in itself any more, this should be enough of a motivation to find other things that make you happy. Probably you need to try out and it might help to also try things that are not socially accepted, even if that means moving from one vice to the next in the eyes of the society. It can still make a big difference in quality of life for some people. For example I personally got rid of an eating disorder by moving on to cutting myself and once having arguments with people around me about my self-harming became too tiring I officially stopped and soon restarted, but doing it in a way that nobody ever sees. A few years later I discovered drugs (especially weed) and moved (at least for the most part) on from physical self harm to smoking weed. Maybe I only swapped symptoms, but I felt a lot better with cutting myself than with an eating disorder and I feel a lot better now with regularly smoking weed than I did with regularly cutting myself.