Dear brothers and sisters in Christ,
As children learn to talk, so too, the children of God must be taught how to pray. Psalm 18 teaches us how to pray during times when we face opposition or even persecution. The verses above especially teach us how to give thanks to God for his protection and his deliverance. Especially helpful are Luther's thoughts about how this psalm applies to to the Christian today (in bold face). I pray that this Psalm become a blessing to you, and something you cling to while facing whatever opposition comes your way.
This is what Luther has to say about this Psalm:
The 18th psalm is a psalm of thanks in which, as the title declares, David thanks God that He has delivered him from all his enemies, such as Saul, the heathen, Absalom, and the rebellious Israelites. David relates that he was in deadly distresses and that God had helped him out of them. In the manner of a prophet he shows how God helped him as God had helped Israel in Egypt. He praises God, who held back his enemies, and thanks God for His help against the disobedient and the rebels, such as were Seba and most of Israel (2 Samuel 20). David had so many enemies and hostile subjects, that even the heathen foreigners (he says here) were more obedient than his own people.
Consequently, everyone needs to keep this psalm as an example of how we should thank God for His help when he delivers us out of our troubles. Whoever wants to explain this psalm spiritually may think of David as a Christian, standing against the heathens, the tyrants, the heretics, and the false Christians. From all of these, Christ and all His people will finally be delivered. Psalm 18 belongs in the Second Commandment and in the First Petition, because it thanks God and praises His holy name. (Reading the Psalms with Luther, pp. 45-46).
And so we pray:
Lord Jesus, both David's Son and David's Lord, thanks be to You, because You undertook the battle against our enemies, and ransomed us from the power of them that hated us. As you now sit at the right hand of the Father, a Lord over all things, be our Rock and our Defense, our Buckler and the Captain of our salvation, that in Your name we may defy and despise the very gates of hell, triumphing over them forever and ever. Amen. (Reading the Psalms with Luther, p. 50)