"I remembered Your judgments of old, O LORD, and have comforted myself."
The best way to get a good perspective on the present and the future, is to heartily believe in the God who has decreed all things in eternity past. It is also helpful to remember how gracious the Lord has been to you in days gone by. All this has the effect of giving us confidence and peace in the current situation (be it "good" or "bad").
Only the faithful churchman can do this, however. For the wicked and unbelieving, their musings on God are *not* comforting. After all, His "judgments" are just that, for them--unless they come by grace to faith and repentance. For the believer, on the other hand, God's judgment has already been poured out on Jesus (on the cross) for them. They can and should rejoice in the forgiveness of their sins.
[Puritan quote of the day: "God intermixes mercy with affliction. He steeps His sword of justice in the oil of mercy. There was no night so dark but Israel had a pillar of fire in it." --Thomas Watson, in "The Godly Man's Picture"]