Psalm 30. In it David does not focus on his current situation but looks back on his life and reflects with gratitude how God has turned his weeping into joy.
Being grateful is good for you. In a recent article from the Harvard Medical School, they say: “…… gratitude is strongly and consistently associated with greater happiness. Gratitude helps people feel more positive emotions, relish good experiences, improve their health, deal with adversity, and build strong relationships.”
Clearly David was onto something when he wrote Psalm 30.