Simple answer, have you tried physical exercise?
I have always found that mindful, focused hard exercise (I do martial arts or club swinging) is useful for getting rid of obsessive sexual thoughts, or if not getting rid of them, at least being able to let them go and leave them be. I often exercise before bed for just this reason, and for whatever psychological or physiological reasons, exercising to a point of mild muscle exhaustion never fails to temporarily calm my sexually obsessive thoughts, or to provide a bit of focus on the present moment.
"Just as a lotus does not grow out of a well-levelled soil but from the mire, in the same way the awakening mind
is not born in the hearts of disciples in whom the moisture of attachment has dried up. It grows instead in the hearts of ordinary sentient beings who possess in full the fetters of bondage." -Se Chilbu Choki Gyaltsen