A little fire softens a large piece of wax. So, too, a small indignity often softens, sweetens and wipes away suddenly all the fierceness, insensibility & hardness of our heart.
But if you are fearful of becoming self-righteous from working for your own salvation, or afraid of being overcome by spiritual pride, examine yourself and observe that the person who is afraid of becoming self-righteous suffers from blindness. For he does not see how self-righteous he is.
Compunction comes when you consider how much you have grieved God Who is so good, so sweet, so merciful, so kind, and entirely full of love; Who was crucified and suffered everything for us. When you meditate on these things and other things the Lord has suffered, they bring compunction.
Understand me. It is so simple. People who do not know God, or who go against Him, are to be pitied; the heart sorrows for them and the eye weeps. Both paradise and torment are clearly visible to us: We know this through the Holy Spirit. And did not the Lord Himself say, 'The kingdom of God is within you?' Thus eternal life has its beginning here in this life; and it is here that we sow the seeds of eternal torment.
The way to attain compunction is an attentive life. ‘The beginning of repentance comes from the fear of God and attention,’ as the holy martyr Boniface says.