17 “You with rebukes have chastened man for iniquity; You have made my life to consume away like a spider”. There is much that is discerned by this Idithun; by every one who discerns as he does; who overleaps as he does. For he says, that he has fainted in God's corrections; and would fain have the stroke removed away from him, “because it is He who made him.” Let Him renew me, who also made me; let Him who created me, create me anew. But yet, Brethren, do we suppose that there was no cause for his fainting, so that he wishes to be “renewed,” to be “created anew”?
It is “for iniquity,” says he, “that You have chastened man.” All this, my having fainted, my being weak, my “crying out of the deep,” all of this is because of “iniquity;” and in this You have not condemned, but hast “chastened” me. “You have chastened man for sin.” Hear this more plainly from another Psalm: “It is good for me that You have afflicted me, that I might learn Your righteousness.” I have been “afflicted,” and at the same time “it is good for me;” it is at once a punishment, and an act of favour.
What has He in store for us after punishment is over, who inflicts punishment itself by way of favour? For He it is of whom it was said, “I was brought low, and He made me whole:” and, “It is good for me that You have afflicted me, that I might learn Your righteousness.” “You chasten man for iniquity.” And that which is written, “You form my grief in teaching me,” could only be said unto God by one who was “leaping beyond” his fellows; “You form my grief in teaching me;” You make, that is to say, a lesson for me out of my sorrow.
It is Thou that formest that very grief itself; Thou dost not leave it unformed, but form it; and that grief, that has been inflicted by You, when formed, will be a lesson unto me, that I may be set free by You. For the word finges is used in the sense of “forming,” as it were moulding, my grief; not in the sense of “feigning” it; in the same way that fingit is applied to the artist, in the same sense that figulus is derived from fingere. You therefore “have chastened man for iniquity.” I see myself in afflictions; I see myself under punishment; and I see no unrighteousness in You. If I therefore am under punishment, and if there is no unrighteousness with You, it remains that You must have been “chastening man for iniquity.”
Source: The Enarrations, or Expositions, on the Psalms (New Advent)