greetings, brother in Christ! I am struggling with the same issue (I think…if we’re headed in the same direction…as in who our girlfriend is, or isn’t…oh nevermind, I think we both get it), and since we are in the season of Advent, I decided I would do something about it!
I am not sure where you are in terms of your spiritual life or what kind of rigor you have, and this may be something to discuss with a spiritual director who knows more about you, but I have started doing several things:
I have started fasting; basically, I’ve had smaller meals with simpler food, as a reminder that earthly things (like food and the sin-which-shall-not-be-named) cannot satisfy me.
I have made sure to pray, pray, pray. I pray the Liturgy of the Hours and a rosary daily.
I go to nearly-daily Mass and receive Holy Communion kneeling on the tongue. I believe that that posture in Holy Communion makes a world of difference in my internal disposition…but as you aren’t fully initiated yet, this is a moot point (as of now).
I have started taking cool (not cold, but cool) showers.
Whenever I find myself tempted to the sin-which-shall-not-be-named or to a lesser sin leading to this unnamed sin, I use a psychological technique called aversion; it’s nothing intense, but I pinch myself. It’s like how people say “pinch me, I must be dreaming”; it’s a way of reminding myself, hey! I shouldn’t be doing that!
Also, I wrap a rosary around my hands before going to sleep and pray Hail Mary’s unceasingly until sleep comes.
This has been working for all of 5 days

hopefully, God’s grace my help me continue in this venture. I pray for you, brother, that you may be successful in your attempt to root out a bad habit!
Post scriptum: if I am tempted, as well as while I am praying, it helps me to look at the crucifix; it keeps my mind from wandering to bad places