Guarding the Tongue Guards the Bris
There are many people who are desperate and say that they would do anything to be free of the compulsion. Here is something that will indeed take much effort, but if one is really ready to do anything, this can help greatly:
WATCH YOUR SPEECH! Be meticulous in avoiding ALL lashon hara (defamatory talk), any untruth, and any coarse language (see sources below).
In order to know what proper speech is and what is forbidden, avail yourself of the Chafetz Chaim's "Guard Your Tongue."
This may seem simple, but it really takes great effort, because we are in the habit of talking without giving much thought to what we say. To become conscious and watchful of speech is anything but simple, but if one is really interested in being free of sexual compulsions, this can be of great help.
Sources: Many Chassidic works are replete with the idea that "bris halashon mechuvan negged bris hamaor" and that shemiras halashon leads to shemiras habris (see Sefer Chareidim 66:9). The most common Posuk quoted in this regard is "Al titein es picha l'hachti es bisorchoh".... See also the mafteach in the Yad Ramah edition of the Shaloh hakadosh for something a bit earlier than chassidish, and this concept also comes up quite a few times in the out-of-print Peleh Yoaitz from the Hornisteipeler (Rabbi Twerski's grandfather).