The Psalms of David seem to bounce back and forth between praising God for taking out his enemies, and then asking God where he went when his enemies are defeating him. Who was attacking David?
Like most people throughout the course of their lives, David experienced highs and lows. There were times when he felt like he was victorious and things were going well, and there were times when it seemed like the whole world was crashing in around him. David’s first attacker was King Saul. David had been hired by Saul as a musician in his courts. But following Saul’s rejection as King by God and David’s famous defeat of Goliath it slowly became clear to Saul that David would be a rival to his throne because he was so loved by the people. David became a fugitive and was pursued by Saul (1 Samuel 19 see also 2 Samuel 3:1). It was in the midst of this that David wrote many Psalms that spoke both of his triumphs and his defeats (see intro to psalm 18).
David was also a great warrior king, in fact David spilled so much blood during his reign that God would not allow him to build the Temple of the Lord in Jerusalem. The primary enemy was the Philistines, but also included the Moabites, the Edomites, and other enemies of Israel. David was victorious in almost everything that he did but he had trials too (see intro to Psalm 56)
Sadly, one of David’s final enemies was his eldest son Absalom, who rebelled against David to take the throne (see Psalm 3).
How should the Psalms be viewed? David comes off as prideful and unloving at many times. Building himself up in the sight of God. My thought was that they should be viewed as a study of how stress and constant anguish can take its toll on a person, and how humans cry out for vengeance, while God cries out for love. What’s the dilly?
There is a bit more going on in this question. The first issue “how should the Psalms be viewed?” is a question about interpretation. It is important that we view the Psalms for exactly what they are, poems. Some of them are songs, some of them are prayers, others are expressions of wisdom, while others are liturgies used for worship services. Just like songs today, they capture the most raw emotions of the human spirit, and they run the range of human emotion. One of the great things about the psalms is that they can help us find words for our own circumstances today. If David seems prideful in one psalm and depressed in another, this does not advocate these feelings as virtues, rather, it speaks to issues and feelings that all people experience, and it reminds us that we can go to God as we are.
I would not be too quick to say that the psalms of David are a commentary on human anguish or a cry for vengeance, nor would I want to suggest that humans are all about vengeance while God ‘cries out for love’. The narratives in 1 & 2 Samuel help us with the commentary of the psalms. In 1 Samuel you see that David actually had mercy on Saul (his greatest enemy), sparing his life on multiple occasions (1 Samuel 24 & 26). David never murdered Saul, Saul killed himself. Similarly, David asked that his son Absalom not be hurt when David’s army went out to meet him (2 Samuel 18:12), and David grieved over his loss when Absalom was killed (2 Samuel 18:31-33). So it must be more than a simple commentary on the vengeful nature of humans. Likewise, it is God who is enables the victories of David (see 2 Samuel 5:9-10) so we cannot make such a simple commentary that God is love and humans are vengeful because God helped David win some bloody battles. While God certainly is a loving God, he is also a God of justice, vengeance, and wrath (see post on Atonement). Those are the ones that no one ever wants to talk about.