What to do When Under Attack
Give the power to Hashem only - and make sure you give the credit to Him when it works. I do not need any pats on the back for not being an idiot by screwing myself up with lust.
Ask Hashem to bless and help the "candy" you see with health, a true connection with Him, protection from the real pains and suffering in many people's lives r"l, protection from false relationships and being used, and for whatever they need.
Recognize and admit openly to someone safe that you are attracted to these people, cuz it's true. The truth is good and there is no way to hide from it. Then daven for them first, as the Gemorah recommends us to do for everybody, and then ask for help. Just say "Help me, G-d". No long prayers for yourself - for others it's OK, but for me I just say, "Help." Then I say "Thank-you, Tatty", and move on with real living.
Stay busy - not to run away, but to be busy - to be in reality, not shekker. If you feel like you are running away all the time, that will lead nowhere.