Another of the Korahite works, Western scholars are all over the place on this psalm. We would miss the point if we tried to shove this down into some particular historical reference. As with most prophetic Hebrew writing, the message here is not so much what happened, but how God does things; it’s about His character.
What kind of God is Jehovah? He has shown favor to the very land itself on which Israel lived. Whenever something took some of them away, God always seemed to make sure they were allowed to come home eventually. It’s obvious to anyone God has been rather patient with this nation, overlooking their moral weaknesses.
How often has He withheld justified wrath? While it may not have been the timing of human wishes, God always seemed to restore the people to His favor sooner or later.
And now would be a good time to ask for that mercy again. Using a standard Ancient Near Eastern formal debate protocol, the psalmist asks the reverse question. Whomever hears is naturally expected to negate what he suggests in these questions. No, it would be uncharacteristic of God to be angry long term with Israel. Continuing in this vein, should the psalmist ask a negative question, the hearers affirm the positive answer. God will surely revive His people again from their sorrows. Indeed, Lord, show us Your mercy!
Our duty is to prepare ourselves and pay attention to what God has to say. He never fails to send a prophetic word. All His revelation is the shalom of mankind, so surely His own servants will turn away from folly. His glorying shining through us is the salvation we seek.
What does that look like? The psalmist waxes lyrical. Mercy and truth become close buddies, righteousness and peace will kiss warmly and moral certainty will sprout like spring flowers in the fresh grass. Moral purity will shine like the sun. And if you don’t quite grasp all that, then we can surely assert that God’s favor will bring forth a harvest, of both domestic crops and wild provision. Can’t you see how a strong moral consciousness runs through His people like a herald as He approaches? He leaves footprints in our hearts for us to find the true path.