The psalm’s title states that this was written as a teaching tool. Israel was attacked and lost the battles. The eventual victories are recorded in the parallel historical accounts 2 Samuel 8:3-14 and 1 Chronicles 18:3-12 (perhaps also 2 Samuel 10). However, the victory is not how this teaching psalm begins. Actually, only the title states that they won the battles. This teaching psalm never states they won. It only ends with the hope of victory through the Lord God.
Rather, than being an account of victory, the psalm teaches that the Lord their God was angry with Israel. The exact reason he was angry is not indicated because it is unimportant to the lesson. The main teaching point is that the Lord was angry with them and yet, his covenant bond with them was not broken. God rejected them momentarily. Desperate times came. Defeat is interpreted as a sign of God’s anger. Yet, as a good loving parent can be angry with their child’s misbehavior, so the Lord Israel’s God was angry with his child Israel.
Psalm 30:4-5 states, “Sing to the LORD, you saints of his; praise his holy name. For his anger lasts only a moment, but his favor lasts a lifetime; weeping may remain for a night, but rejoicing comes in the morning.” And as Jesus taught, “Blessed are the poor in spirit, for theirs is the kingdom of heaven. Blessed are those who mourn, for they will be comforted.” (Matthew 5:3-4) When rebuked by my loving God I need to morn and pray. Those who fear God will see his banner of hope (4).