I was glad to read the following comment by Christopher Wright regarding lament in general and lament psalms in particular.
"Is this not a bit surprising? Here we have a book that bears the title 'The Praises,' yet the largest group of 'Praises' are actually laments! This may seem contradictory to us, but that is because we unusually think of 'praise' only as something we do when we feel happy and joyful. But for Israel, praise was something far deeper than that. Praise could happen even in the darkest moments—in fact, especially in those darkest moments.
"For Israel, praising God meant recognizing God's reality and presence. Praise meant affirming that the LORD God of Israel is the one and only true and living God. Praised described the character of God and declared the acts of God. Praise was essentially, God-talk. Praise is to bow down in God's presence (no matter what the circumstances) and affirm, 'God is alive, and God is here, and God is like this, and God has done that.'"
Christopher J. H. Wright, How to Preach and Teach the Old Testament for All Its Worth (Grand Rapids: Zondervan, 2016), 237.