Changing a habit can be challenging.
Now the question is:
is this a compulsion? Can you really control it? You'll have to answer this in a very honest way to yourself, because that will be the difference between the need on self training on not doing it or need for medication to control the impulse.