Learning to hate the thing controlling you with a passion. Make it the epitome of everything wrong, make it your nemesis. Think of everything you hate and attribute it to that which you wish to get rid of. Many say hatred is a bad thing, but I believe there is such a thing as righteous anger towards things worth hating. As cheesy as it is to quote a video game character, there is wisdom in Darion Mograine from WoW: "Harness your hate, make it useful."
If that alone isn't enough, then you will also have to give yourself a motive behind disgust for it. This can be anything so long as it is something very meaningful to you.
Then there is finally the simple matter of keeping yourself busy. Idleness leads to these kinds of compulsions. I'm going to assume that you have a lot of free time to be staring at dead-inside whores that many times a day, so I'd suggest that you find something to keep you busy for lengthy periods of time. Anything will suffice so long as it is something you want to do and will take time be it a grindy video game, a new craft, a busy job, it just has to keep your mind off of the thing bothering you.
A lot of folks suggest to keep track of days and set goals but this just makes the thing stay on your mind and, because of that, it will take a hold of you much easier. Remember, it is your worst enemy and its weakness is neglect.
All of this will take time, practice, and discipline and you will fail multiple times. However, you will get better and better as time passes and eventually it will be but a gnat that you occasionally have to swat away.