Is an addiction a mortal sin? Many might ask this question. It’s not exactly a clear answer.
Acting upon an addiction may or may not be mortal. For something to be mortal sin it must include “full knowledge and complete consent” (cf. CCC 1859). If a person knows what they are doing is grave and deliberately does so anyway, then it is a mortal sin. If either two is lacking, then it is not a mortal sin.
“Imputability and responsibility for an action can be diminished or even nullified by ignorance, inadvertence, duress, fear, habit, inordinate attachments, and other psychological or social factors.” (n. 1735)
So, let us say you are addicted to pornography and masturbation, alcohol, or drugs (medicinal or recreational). Your acting upon the addiction may or may not be mortal sin if the addiction “is of grave matter and which is also committed with full knowledge and deliberate consent” (n. 1857). Keep in mind psychological issues, social factors, fear and ignorance for example lessen the sin. Obviously, certain acts — for example pornography, masturbation and use of drugs — are always sinful no matter what, but the factors mentioned do lesson the guilt of sin.
In the end we can only pray and perform good works. These things are nevertheless very powerful; it might take some time, but if you persevere, you can overcome your challenges. Our Lord said that some demons can only be expelled through fasting and prayer (rf. Matthew 17:21, Mark 9:29).
Keep going to Confession and receiving Holy Communion; do not be disappointed if you don’t stop sinning overnight. That’s practically unheard of. Catholic theology calls it the law of graduality. It ties in to sanctifying grace.