While sin itself is always bad, for the sinner who sincerely repents, and turns to God who forgives the sin, it can be the occasion of joy over the mercy and love of God that are revealed in his forgiveness of it.
St. Thérèse of Lisieux apparently went so far as to say that the lovers of God "take delight" in their indeliberate faults, inasmuch as they show God's mercy.
"The rest of us don't belong among those saints who cry over our sins: we take delight in them because they serve to glorify the mercy of God." (Words of St. Thérèse recollected by Sr. Marie of the Trinity.)
And her sorrow for the sin itself, she offers to God as a sign of her love for him.
"When I have committed a fault that makes me sad, I know well that this sadness is the consequence of my infidelity. But do you think I stop there? Oh no, I'm not so silly! I hurry to say to God: My God, I know that I have merited this feeling of sadness, but let me offer you all of it as a test that you send me out of love. I regret my sin, but I am content to have this suffering to offer to you. (Words of St. Thérèse recollected by Sr. Agnes of Jesus.)