17 Surely it was for my benefit that I suffered such anguish. In your love you kept me from the pit of destruction; you have put all my sins behind your back.

Read Isaiah 38:17 Using Other Translations

Behold, for peace I had great bitterness: but thou hast in love to my soul delivered it from the pit of corruption: for thou hast cast all my sins behind thy back.
Behold, it was for my welfare that I had great bitterness; but in love you have delivered my life from the pit of destruction, for you have cast all my sins behind your back.
Yes, this anguish was good for me, for you have rescued me from death and forgiven all my sins.