For some reason David is experiencing hard times, so he has written a lament. Most of God’s people in the Bible experienced hard times. David called upon the Lord for help, and acknowledged the Lord as his king and his God. He knew that the Lord was the One who ultimately determined the course of his life.
David made his requests known to God at the start of the day. He knew that God stood for righteousness. So the arrogant people who opposed David were also on the wrong side of God. Today people talk about being on the wrong side of history, being on the wrong side of God is a far more serious place to be in. So when the unrighteous oppose us we need not fear.
David asks the Lord to lead him in His righteousness. The unrighteous are full of evil and deceit, but those who take refuge in the Lord can be glad and full of joy. The Lord is a shield around us.