Dora Bas Rivka Silver O'H
This Psalm was written when David hid from Saul in a cave, as detailed in I Samuel 24. As described there, David crept up on Saul and cut off the corner of the king's garment, in order to demonstrate that he was not Saul's enemy. Instead of the usual musical note, the Psalm starts with a plaintive cry of "do not destroy" as David pleads to G-d for salvation.
David asks G-d for favor him in two ways: saving him from Saul and not forcing him to harm the king in self-defense. David turns to G-d for salvation, not to weapons, and he will stay in G-d's protective shadow until the crisis is resolved. He will call upon G-d, who always fixes things for him, rather than take up arms against Saul. G-d will act accordingly.
David's life is threatened by great men, whom he compares to lions. He sought refuge in Ziff, whose residents betrayed him, burning him like fire. He is slandered by people with mouths like weapons (possibly referring to the people of K'ila who informed on David in I Samuel 23).People such as these don't deserve to have G-d dwell with us here on Earth; they would deserve it if He "withdrew" to Heaven, where He wouldn't be among such treacherous people.
Saul used the people of Ziff to set a trap for David, but G-d made it backfire. David places his confidence in G-d, whether He judges David strictly or with mercy; in either case, he praises G-d with song. David is moved to take up his instruments and to praise G-d with the dawn. He thanks G-d in full view of the nations of the world because His kindness and truth know no bounds. David hopes that G-d will soon reveal His glory over all the people in the world.