וּבְשֵֽׁם־יְהוָ֥ה אֶקְרָ֑א אָנָּ֥ה יְ֝הוָ֗ה מַלְּטָ֥ה נַפְשִֽׁי׃
내가 여호와의 이름으로 기도하기를 여호와여 주께 구하오니 내 영혼을 건지소서 하였도다
Or HaChaim
We have a tradition that one blesses G'd joyfully when something tragic occurs in one's life (Berachot 60). The reason is that when G'd subjects us to discipline He does so in order to insure that our future will be happier, will be guiltless. G'd alluded to this by saying here that even when He is perceived as "only" אלוקיך, the G'd who exacts retribution from you, He is still השם, i.e. the G'd who deals with you from a feeling of loving kindness seeing He has your ultimate welfare at heart.