The psalmist’s encouragement to lean into hope is not wishful thinking based on some abstract concept but arises out of past experiences. God was faithful in the past; there is nothing to suggest God isn’t faithful in the present or won’t be in the future. The doubt, the questioning, the struggle, arise out of the context of a deep faith.
This is why it is so important to retell the stories of God’s faithfulness, to bear testimony of God’s greatness. It is even more important to tell those stories during difficult times. “These things I remember…” Such testimonies become songs in the night.