And, what is more, one should rejoice more in affliction than in good. For if one lived in (the midst of) good all of his life, his transgression is not forgiven (thereby). And by what is it forgiven? By affliction.

R. Eliezer b. Yaakov said: It is written (Proverbs 3:12) "Whom the L-rd loves, He chastises, as a father is reconciled with his son": What causes a father to be reconciled with his son? Afflictions.

R. Meir says: It is written (Devarim 8:5) "And you shall know within your heart that as a father afflicts his son, the L-rd your G-d afflicts you." You and your heart know what you have done and that the afflictions that He has brought upon you are disproportionate (in leniency) to the (severity of) sins that you have committed.