13 Some one is mulcted in property: he becomes sad, but this does not make good his loss. Some one has lost a son: he grieves, but he cannot raise the dead, nor benefit the departed. Some one has been scourged, beaten, and insulted; he becomes sorrowful. This does not recall the insult. Some one falls into sickness, and a most grievous disease; he is dejected. This does not remove his disease, but only makes it the more grievous. Do you see that in none of these cases does sadness answer any useful purpose?
Suppose that any one has sinned, and is sad. He blots out the sin; he gets free from the transgression. How is this shown? By the declaration of the Lord; for, speaking of a certain one who had sinned, He said, “Because of his iniquity I made him sad for a while; and I saw that he was grieved, and he went on heavily; and I healed his ways.” Therefore also Paul says, “Godly sorrow works repentance unto salvation not to be repented of.” Since then what I have said clearly shows, that neither the loss of riches, nor insult, nor abuse, nor stripes, nor sickness, nor death, nor any other thing of that kind can possibly be relieved by the interference of grief, but sin only can it blot out and do away, it is evident that this is the only reason why it has its existence.
Let us therefore no more grieve for the loss of wealth, but let us grieve only when we commit sin. For great in this case is the gain that comes of sorrow. Are you amerced? Be not dejected, for thus you will not be at all benefited. Have you sinned? Then be sorry: for it is profitable; and consider the skill and wisdom of God. Sin has brought forth for us these two things, sorrow and death. For “in the day you eat,” He says, “you shall surely die;” and to the woman, “In sorrow you shall bring forth children.” And by both of these things he took away sin, and provided that the mother should be destroyed by her offspring.
For that death as well as grief takes away sin, is evident, in the first place, from the case of the martyrs; and it is plain too from what Paul says to those who had sinned, speaking on this wise, “For this cause many are weak and sickly among you, and many sleep.” Inasmuch, he observes, as you have sinned, you die, so that you are freed from sin by death. Therefore he goes on to say, “For if we would judge ourselves, we should not be judged. But when we are judged, we are chastened of the Lord, that we should not be condemned with the world.” And even as the worm is brought forth from the wood, and devours the wood; and a moth consumes the wool, from whence it originates; so grief and death were born of sin, and devour sin.
Source: Homilies on the Statues (New Advent)