what i do is pray for God to harden my heart towards lust and soften it towards His will
if i have that initial lustful thought i try to pray even if only in my head asap
think about other things
things God wont disapprove of
and also try to imagine Him and angels actually observing you.... because every single thought and action is being recorded
maybe this all sounds like generic advice...
but i guess to constantly pray
and change those lustful thoughts as fast as you can into something else
if you have head phones
maybe keep them on you
so you can turn on audio scripture or sermons or street preaching to convict you in these moments of temptation...
even if you fail at first (entertain the thoughts longer than the initial one that pops into your head)
BEFORE you take action towards feeding into your lusts
put yourself in a situation that makes it impossible
leave your home, go somewhere public
or if you view things too
shut off your phone
or computer or tv