David knew how to pray; it wasn’t some new thing he was trying out. In verses 1-7, his prayer is one of pleading and praise. “O Lord, You are so good, so ready to forgive, so full of unfailing love for all who ask for Your help.” Notice how he humbles himself to the Lord: “I need Your help. . .I am devoted to You. . .I serve You and trust You. . .I give myself to You.”
In verses 8-13, David said two things that we should imitate. First he acknowledged that the Lord is so much greater than the gods of other nations: “All the nations You made will come and bow before You, Lord; they will praise Your holy name”. That is a prophecy Paul repeats in Phil. 2:9-12 about the Lord Jesus Christ, “at the name of Jesus every knee should bow, in heaven and on earth and under the earth, and every tongue confess that Jesus Christ is Lord, to the glory of God the Father”. Second, he asked, “Teach me Your ways, O Lord, that I may live according to Your truth! Grant me a pure heart, so that I may honor You.” Shouldn’t every believer ask for this each day?
Finally, David got to the critical issue; others were still trying to kill him. With this in mind, he asked for strength. This was a request for physical strength, emotional strength, and, most of all, spiritual strength. When things are going against us, it becomes so easy to want to give up or to take revenge. It is a common problem we humans have. Depression hits us and we turn to the wrong solution(s). But God wants us to trust Him. Even Abraham and Isaac made bad choices in their early walk with the Lord, but God helped them because He is always faithful to His children.