You can find these same verses in Psalm 18. We have said that the Psalms were primarily written by David, and I am comfortable with this as these two Scriptures correspond almost exactly. It is a celebration of the deliverance of David by God from the hands of the enemies of David. The beginning of this chapter also specifies the hand of Saul which was one of David's primary enemies, but an enemy that he did not want to raise his hand against.
There is a real sense of confidence that God will deliver in these verses. It is a confidence that is built up over time and over the experiences of a young shepherd boy who went to battle against a giant armed only with a slingshot. This Scripture reflects the confidence of a man who has sinned against the Lord and yet was able to be forgiven and given a second, third, fourth, and so on chance in order to fulfill God's purposes.
Where is our sense of confidence these days? Where do we find ourselves when we tremble and are afraid? Do we say: The Lord is my rock. I call upon the Lord and I am saved from my enemies. We should do that more often.