From the title of the psalm, we realize that among the many foes of Psalm 3:1 were Absalom (David’s own son), Ahithophel (a close advisor to David, 2 Samuel 15:31; 2 Samuel 16:23), a certain Shimei (2 Samuel 16:5–13), and the whole army of Israel (2 Samuel 17:24). See 2 Samuel 16:5–13 for the whole event.
Realizing who David’s many foes and enemies are helps to bring this psalm closer to home, closer to our own hearts, our own hurts. It is not hard for us to imagine the pain of having your own child turn his or her back on you. Maybe you have experienced that. Maybe a child of yours hates you, wants nothing to do with you! How painful! And even if you may not have a child who hates you and views you as an enemy, most of us have experienced a friend, a close advisor like Ahithophel, turning against us, now viewing us as a foe and enemy. Hopefully, such a person is not actually out to kill you like Absalom was, but people have very effective ways of wounding us as deeply as any sword or spear can—whether it is their words, or how they treat us or talk about us. And especially if it comes from a family member or an old friend, it is like something inside of you dies.
1 O LORD, how many are my foes! Many are rising against me;