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.
If we fervently desire holiness, the Holy Spirit at the outset gives the soul a full and conscious taste of God’s sweetness, so that the intellect will know exactly of what the final reward of the spiritual life consists.
Holiness is not simply righteousness, for which the righteous are rewarded with blessedness in the Kingdom of God; rather, it is such a height of righteousness that people are so filled with the grace of God that it flows from them even upon those who associate with them. Great is their blessedness, which proceeds from their direct contemplation of the glory of God. Being filled also with love for men, which proceeds from love of God, they are responsive to men's needs, and at their entreaties they act as mediators and intercessors for them before God.
No one can say, 'I am poor and hence I have no means of giving alms.' For even if you cannot give as the rich gave their gifts into the temple treasury, give two farthings as the poor widow did, and from you God will consider it greater gift than the gifts of the rich. And if you do not have as much as two farthings? You can take pity on the sick and give alms by ministering to them. And if you cannot do even this? You can comfort your brother by your words. 'A good word is better than the best of gifts.'
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.