David, the author is asking for not only forgiveness but restoration. He is asking for his will to do what is right made better than before. He does not want to repeat this error. He promises that once the Lord does this he will teach other transgressors of the covenant the Lord God’s ways. He will be a mentor to the young fool. He will help sinners turn back to God.
Apostle Paul wrote the congregation in Colossae, “Let the peace of Christ rule in your hearts, since as members of one body you were called to peace. And be thankful. Let the word of Christ dwell in you richly as you teach and admonish one another with all wisdom, and as you sing psalms, hymns and spiritual songs with gratitude in your hearts to God. And whatever you do, whether in word or deed, do it all in the name of the Lord Jesus, giving thanks to God the Father through him.” (Colossians 3:15-17)