This Psalm was written by the descendants of Korah. Korah, a cousin of Moses, was the one who led the rebellion against Moses during the journey from Egypt to the Promised Land. He was the leader of the group that was killed when the earth opened up and swallowed all of the rebels. Not all of the sons of Korah rebelled. There was a remnant left to carry on the family name. This family had experienced both the wrath of God and His loving kindness. From these experiences, we can deduce that they understood that it is okay to complain to God as long as it is done in a respectful way. Just as this Psalm begins with how much they long for the goodness of God, then it proceeds to alternately complain and remember the blessings of God.
When we are complaining to God, it is good to mix in a little worship with the whining. It is good to recount the times He has blessed us and thank Him for those times. The writers of this Psalm question themselves. What reason do they have to be sad and discouraged ? We need to ask the same question and arrive at the same conclusion they did. If we put our faith and our hope in God, we won’t be sad and discouraged, but we will be filled with joy and praise for God and His goodness. We will long for His presence just as a thirsty deer longs for a drink of cool water. God’s presence is like an oasis in a desert of depression. Spend time in that oasis, drink deeply from the healing springs and thank Him for His goodness.