Psalm 102 is one of the seven “penitential” Psalms. In it, the author pours out his heart to God, telling Him both the physical and emotional stresses he’s experiencing as a result of God’s wrath (v.10). The author is in a bad state—lost appetite, insomnia, depression—and understands that he can’t stay that way. God needs to intervene.
So the psalmist focuses his mind on God’s nature and promises. God is the omnipotent creator of the world, who will reign forever (v. 12, 25-26). He has made promises to bring Israel back to the land (v. 13), and bless the nations through them (v. 21-22). God’s children can thrive in the security of eternal life in His presence (v. 27-28).
It’s interesting that we aren’t told what happened to our psalmist; he just tells us the story to that point (v.23-24). I think that’s okay. It tells us something deeper. The psalmist has turned his gaze to the eternal God, and is able to rest in God’s promises. He’s seeking the Better Country, the one in God’s presence (Hebrews 11:13-16). God is not ashamed—he’s honored!—by that kind of faith.