Notice David used the most holy name for God four times in these three verses. The idea is that the God who is, knows all things and is also aware of every the situation I am in. If He knows all things, He is the best source of help one can imagine to deal with whatever we are dealing with at any given moment.
Interestingly, David does not spend a lot of time telling God the details of his problems. David figures if God knows all things, then He already knows the details. What David is doing here is reminding himself that God can help him through this situation and it is David's desire for God to guide him through life's ups and downs.
David's prayer in effect is "Don't let my enemies win over me, because if they do, they will just grow even more proud in their rebellion against You". After all, David did not want God's reputation to be tarnished by allowing his enemies to have the victory. David desired to achieve God's will for his life in every situation.
This brings up an important question (which does not seem to be the case here as David calls these people "wicked" in verse 8): "What if our battle is against others who trust in God?" The answer is, we still pray for God's will to be done and we accept that if it is His will to help other believers to triumph over us, then it is His will and we accept it as such.