A commitment to prayer, at least every day and evening, including prayers for purity of mind and soul. Frequent receptions of the sacraments, including the cleansing sacrament of reconciliation. Having a prayer book handy, or memorized prayers in mind to say whenever reprobate thoughts enter the mind. Memorized prayer can even be very short–“Jesus, have mercy! Mary, my mother help me!” A lot of patience, as the transforming power of God can often be gradual…
Making an appointment with the priest at the nearest parish could be a help–he could personalize his guidance for you.