David’s time as a fugitive, running for his life and from Saul, yielded a treasure of psalms telling us how he felt.
Psalm 59 – written when Michal his wife puts her life on the line and buys David time to make an escape (1 Samuel 19).
Psalms 34 and 56 – written when David narrowly escapes death from the Philistines (1 Samuel 21:10ff).
Psalms 57 and 142 – written while taking refuge with a host of other desperados in a cave (1 Samuel 22).
Psalm 52 – when he defeats the Ziphites who betrayed his location to Saul (1 Samuel 23).
Why David thought it would be safe to hide among the Philistines remains a mystery. Perhaps he thought they would be honored to have such a skilled warrior who had killed so many of their brethren. In any case, it speaks to David’s desperation, and in that desperation, he wrote Psalm 56. David is afraid (vs. 3). He weeps in fear (vs. 8). Like most of us in desperate times, David makes promises to God if only God will deliver (vs. 12). And, like most of us, David reminds himself there’s a limit to what mankind, even the cruelest of them, can do to us. They are not God, but mortal.
Of course, mortals can do plenty to us, but they cannot adjust or change our relationship with God, nor rob those who trust Him of the deliverance He provides (in whatever form it might come).