LORD, do not rebuke me in Your anger,
Nor chasten me in Your wrath.
Be gracious to me, O LORD, for I am pining away;
Heal me, O LORD, for my bones are dismayed.
David was being chastened by God. "To chasten" means to correct or to make someone suffer so that they will learn a lesson and correct their life.
God was causing David to suffer, and David prayed that God's chastisement (the noun) would be not be in anger or wrath, but in the kindness and mercy of God. God chastises all His children, but He does not correct us in wrath and anger. When we are being corrected by God, it is good for us to pray for the mercy of God. In other words, it is right to pray for God to do what God promises to do. It is good to ask God to treat us with the kindness of His kind character. Prayer is never asking God to do what He does not promise, or asking God to do what He does not want to do. Prayer always asks God to fulfill His promises and to do His own will.
In Psalm 6 David does not confess any sin. Of course David is a sinner and some of his Psalms record confession of sin but not this Psalm. Like Job, David has no sin to confess at this time. Psalms of confession of sin are called "Penitential Psalms," but Psalms that record a cry to God because of the sadness or hardness of life are called "Lamentations." This Psalm is a lament--a record of of David's sad cry.
Not all of your suffering is because you have sinned. Most suffering is because Adam sinned, which is not your fault, but it is definitely your problem. You live in a world of sin and suffering. Saved and unsaved people share the same hard life of tears. But saved people have the Lord Jesus with them in their suffering! Also for saved people, this life is the worst that life will ever be. Soon they will be with Jesus in glory, and all tears will be traded for eternal joy. For the unsaved, this life is the best that life will ever be. When they die they will be separated from Jesus, and they will trade the few joys and moments of happiness of life for eternal tears and pain. Suffering now for the saved is chastisement. It is training for an eternity of joy.
Use your pain to bring you to God, and learn what He would like to teach you.
For me to live is Christ.