My dear brother, you are on the right road. Do not feel discouraged - you should, in fact, expect sin from yourself and not let it “bother” you, while still allowing for contrition, which, if held out of a sincere sorrow for offending God, reconciles you to Him, in view of desiring to use the proper sacramental re-entry into the normal life of the Church (baptism now, and then confession).
Find ways to avoid this sin and others. My standard advice for chastity here (change to fit your circumstances):
There are monitoring programs (like Covenant Eyes) that can help with controlling electronic media. You could try using that with a trusted friend or mentor. Other than that, you need to put distance between yourself and the occasion of sin - keep windows and doors open, take cold showers, reduce (or eliminate temporarily) alcohol use around certain people/in certain situations, etc. Laughing more is also helpful, especially in the moment of temptation (rational delight filling the body - so watch more comedy!) as is fasting and other mild discomfort which distracts the body (holding your breath, biting your tongue, etc.)… just getting up and walking around can also give the space and time necessary to get a grip. Exercise also helps, in various ways, also in the moment… distracting and exhausting the body. Instinctively praying a decade of the rosary (meditating especially on one of the sorrowful mysteries) or singing a verse of a pious hymn will also create the time and strength of will you need to do what is right. Meditate also in the moment on the imminence of death, and always ask for the help of the Blessed Virgin Mary and St. Joseph… and ask the Lord always for the help you need. Go to confession as needed, then return to receiving Holy Communion.