One thing that has struck me in reading the Psalms, is how many times the Psalmist praises God in the midst of suffering. It has seemed to me that praising God and going through trial are terms that are opposite from one another, or that we should praise God after the He has already delivered us. But the Psalmist did not think so. Take these examples, which are verses taken from the context of much adversity for the Psalmist:
"But I am afflicted and in pain; May Your salvation, O God, set me securely on high. I will praise the name of God with song and magnify Him with thanksgiving." Psalm 69:29,30
"My mouth is filled with Your praise And with Your glory all day long." Psalm 71:8
"But as for me, I will hope continually, And will praise You yet more and more." Psalm 71:14
So it seems that the Psalmist not only prayed to God for deliverance, and let his complaint be known to God, but he also praised God in the midst of his affliction. And Psalm 71:15,16 helps us out during the times when it seems that we can't find anything to praise God for: "My mouth shall tell of Your righteousness And of Your salvation all day long; For I do not know the sum of them. I will come with the mighty deeds of the Lord God; I will make mention of Your righteousness, Yours alone." So God's righteousness, faithfulness, holiness, salvation, and His mighty deeds are the fodder for praising God.