David asks God to not punish him when He’s angry. God may indeed have been punishing him, but it’s more that sin and guilt separate us from fellowship, and that outside fellowship, life is miserable. God may have made David’s body sick, but probably David’s guilt and lack of acceptance of God’s forgiveness also made David’s body sick.
You know all my desires, O Adonai.
I will wait with hope for You, O Yahweh. You will answer, O Adonai, my Elohim.
There is hope and comfort in the midst of agonizing distress.