A few days ago someone asked me a very good question, one that I thought might be useful to address here:
From my understanding, the Church teaches that mortal sins can be forgiven outside of a sacramental confession if the penitent has perfect contrition. Do you know from where the Church derives this teaching? I don't really understand how the penitent only needs imperfect contrition in the course of a Confession in order for the absolution that the priest gives to be valid, but that a person needs perfect contrition outside of confession in order for his sins to be forgiven.
My initial response was simply the power of the keys, namely, that whatever the Pope and the Bishops "bind on earth shall be bound in heaven, and whatever you loose on earth shall be loosed in heaven" (Matthew 16:19). While this answer would be true, I suspected it would not quite be satisfactory.
The inquirer is correct about the two forms of contrition, but to understand the distinction, we first need a definition of contrition. The Catechism of the Catholic Church describes contrition as "sorrow of the soul and detestation for the sin committed, together with the resolution not to sin again" (1451).
As we said, the Church recognizes two forms of contrition, perfect and imperfect, both of which are good, but one of which is better:
When it arises from a love by which God is loved above all else, contrition is called "perfect" (contrition of charity). Such contrition remits venial sins; it also obtains forgiveness of mortal sins if it includes the firm resolution to have recourse to sacramental confession as soon as possible.
The contrition called "imperfect" (or "attrition") is also a gift of God, a prompting of the Holy Spirit. It is born of the consideration of sin's ugliness or the fear of eternal damnation and the other penalties threatening the sinner (contrition of fear). Such a stirring of conscience can initiate an interior process which, under the prompting of grace, will be brought to completion by sacramental absolution. By itself however, imperfect contrition cannot obtain the forgiveness of grave sins, but it disposes one to obtain forgiveness in the sacrament of Penance (CCC, 1452-1453).
Perfect contrition can obtain the forgiveness of sins outside of a sacramental confession (providing the intent to make a sacramental confession when possible) because it is concerned solely with the honor God; imperfect contrition cannot obtain the forgiveness of sins outside of a sacramental confession because while it is concerned with the honor of God, it is also concerned with the good of the penitent. It is good to be filled with sorrow because of our sins and to detest them because they can jeopardize our salvation; it is better to filled with sorrow because of our sins and to detest them because they offend the goodness of God.
This distinction between perfect and imperfect contrition, and the fruits of each, was taught by the Council of Trent:
The council teaches therefore that though it happens sometimes that this contrition is perfect through charity and reconciles man to God before this sacrament is actually received, this reconciliation, nevertheless, is not to be ascribed to the contrition itself without a desire of the sacrament, which desire is included in it. As to imperfect contrition, which is called attrition, since it commonly arises either from the consideration of the heinousness of sin or from the fear of hell and of punishment, the council declares that if it renounces the desire to sin and hopes for pardon, it not only does not make one a hypocrite and a greater sinner, but is even a gift of God and an impulse of the Holy Ghost, not indeed as already dwelling in the penitent, but only moving him, with which assistance the penitent prepares a way for himself unto justice. And though without the sacrament of penance it cannot per se lead the sinner to justification, it does, however, dispose him to obtain the grace of God in the sacrament of penance (14.3.4).
When making this distinction, the Council of Trent cited such verses of the Sacred Scriptures as Ezekiel 18:31, Psalm 50:6 and 6:7, Isaiah 38:15, Jonah 3:5, Matthew 12:41, and Luke 11:32.
To sum, an imperfect contrition is insufficient to obtain the forgiveness of sins outside of the sacrament of penance because it not motivated solely by love for God, but also love for the sinner.