This is NOT a hymn of joy. It is a dirge. It speaks of horrible losses, ridicule of an enemy and the sheer trauma of the Babylonian captivity in its first days. It is one of the few insights into the emotional and spiritual condition of the Jews who were taken as captives to Babylon after the siege of Jerusalem. They had survived having their homes ransacked, family members killed, culture absorbed, and their city destroyed. Marched to Babylon, they sat down at a river and wept bitter, painful tears as their captors ridiculed their suffering.
This psalm does not represent healthy spirituality. It is an accurate, bitter cry of resentment against enemies. Its imprecatory requests for God to brutalize Jerusalem's enemis is just unmitigated vengeance motivated by trauma and pain (Psalm 137:7-9). It makes the captives morally no better than the captors. As such even as it does give us understanding into the heart of trauma, it does NOT give us permission to hate.
Life's losses can throw us onto a faithful God. Our pain, bitterness, broken and sinful spite, and all that accompany these things will still show through in us. Yet, God will be faithful.