Psalm 102 teaches us how to pray when we are in distress.
It was written by someone who suffered through the exile in Babylon, but it applies to anybody in suffering. Like the changing weather, this psalm expresses the psalmist's changing mood.
1) Clouds gather (v. 1-2). He first cries out to God. "Lord, hear my prayer...Do not hide Your face from me in my day of trouble..."
2) Gloom and darkness (v. 3-11). Next, he describes his suffering: heartache (v. 4), he can't eat (v. 4), he loses weight (v. 5), he is lonely (v. 6). he can't sleep (v. 7), he suffers abuse (v. 8), he weeps (v. 9), and he suffers because of his sin (v. 10). Thus he says, "My days are like a lengthening shadow." (v. 11). But the clouds part and the sun shines in.
3) Sunshine (v. 12-22). A ray of future hope from the Lord shines in his heart, and he sees that he will see the ruins of Zion and rebuild Jerusalem, or at least the future generations will see it.
4) Clouds return (v. 23-24). But as he waits for the fulfillment of his future hope, the clouds of doubt return briefly. Can't we all relate to that?
5) Eternal light (v. 25-28). Finally the psalm ends with a statement of faith in the eternal light of God, for even when the earth wears out like clothing, "You are the same, and Your years will never end." (v. 27). This part of the psalm is quoted in Hebrews 1:10-12 as a prophecy of Jesus Christ. This reminds us that our ultimate light and hope for our distress comes when we trust in Jesus.