I think everyone is different about how they can deal with such things but I can only draw comparisons about how I have left behind other vices.
Firstly, you have to really want to give up. Again speaking personally I find that I have to have something which provides a jolt, a splash of metaphoric cold water.
Secondly, you don't have to just give something up, you have to remove yourself completely from it. All paraphenalia, all potential reminders, all interaction.
Thirdly, distraction. Find something else to do instead.
Finally, give yourself a realistic aim in terms of quitting.
So for example, smoking. I gave up following some dental work. I then removed all ashtrays, lighters, matches, papers anything.
I found that when I had cravings the ability to lose myself in something else was critical - online games such as chess and backgammon did it for me. They concentrated my mind on something else.
And finally an aim. I didn't aim to quit smoking for ever. To start with it was a day, then a week, then a month. It must be over a decade now.
With smoking it helped that all adverts are covered, smoking in pubs ceased, it's not in telly progs and films any more and they aren't in display in shops.
With punting I do wonder if I were to give up whether I'd get a craving every time I see a massage shop in some tiny sub-high street?