17 “Yea, like as a father pities his own children, even so has the Lord had mercy on them that fear Him”. Let Him be as angry as He shall will, He is our Father. But He has scourged us, and afflicted us, and bruised us: He is our Father. Son, if you bewail, wail beneath your Father; do not so with indignation, do not so with the puffing up of pride. What you suffer, whence you mourn, it is medicine, not punishment; it is your chastening, not your condemnation. Do not refuse the scourge, if you dost not wish to be refused your heritage: do not think of what punishment you suffer in the scourge, but what place you have in the Testament.
Source: The Enarrations, or Expositions, on the Psalms (New Advent)