Disconnecting from a thought

I’d love some advice on how I’m doing with managing my mind.
I’m married but for some time I had feelings for another man. I’m ready to move on from that and I want my result to be that I’m over the other guy.
I have trained my brain however to think about the other guy – day dreaming, looking at his Facebook, etc.
Now when I feel this urge / slip into the habit, I think, ‘I don’t do that anymore’ (I did the same thing when I quit smoking 4 years ago). I then focus on a new thought – ‘I choose my husband’.
It’s helping a little and I’m moving in the right direction but still the urge is strong. Am I on the right track? Any other tips?