The psalmist is having trouble. We can relate. And so he prays:
“O LORD, rebuke me not in Your wrath, And chasten me not in Your burning anger.” (Psalms 38:1 NAS95)
Let's be clear: the psalmist is not asking to avoid rebuke or chastening. He is asking that He be spared the fierceness of God's wrath and burning anger in the process. "Deal with me, but deal with me gently."
These two (Hebrew) words describing God's anger are used in a telling context at the foot of Mt. Sinai when Moses descends only to find God's people sunk in sin. As Moses recounts the scene years later, he describes it this way: “For I was afraid of the anger and hot displeasure with which the LORD was wrathful against you in order to destroy you” (Deuteronomy 9:19 NAS95). These people were in deep danger. Their sin, and mine, creates an acute problem.
The best cross-reference I have found for God's action of rebuking and chastening is in Jeremiah 2:19: “Your own wickedness will correct you, And your apostasies will reprove you; Know therefore and see that it is evil and bitter For you to forsake the LORD your God, And the dread of Me is not in you,” declares the Lord GOD of hosts.” Jeremiah 2 is a classic chapter in describing the loss and peril that attaches to those who walk away from God. Now apply this to your own situation. Think about your sin(s), and then state that first phrase: "Your own wickedness will correct you." That is, the sin that you yourself commit will become the stake that skewers you one day in the future. The commission of sin(s) opens the door for evil and bitterness to flood into your life.
This all stems not just from your attraction to sin, but much more from your aversion to the fullness of who God is. One aspect that you and I purposely neglect is this: that God hates sin. He hated Israel's sin. He hates my sin. He hates your sin. God is terrible in relation to sin, and will unleash His terrors on sin and sinners. Aslan is not a safe lion, and our God is not a safe God. It is good for you and I to know something of the dread of God.
We cannot stop here. The blessed Gospel provides a safe haven from which we, like Daniel's three friends, can feel the fire without being consumed by the flames. Our Savior, Jesus Christ stared deeply into the dread of God and was consumed by it. He bore the penalty of our sin(s) Himself in our place. In Christ, we have relief. In Christ, the psalmist's prayer is answered: God will rebuke and chasten, but not in His wrath and burning anger, not because He has laid aside His wrath, but rather because His wrath has been spent and satisfied in Christ's sacrifice.
As I sit here, hidden in Christ, I now ask that I would not be ignorant or forgetful of the dread of God - that my Father in heaven hates sin with a vengeance, and therefore, so should I. And, if you sit there, apart from Christ, I pray that the dread of God would compel you to come quickly to Christ and find the answer to the psalmist's prayer in Him.