In one of his homilies, St. John Chrysostom includes a prayer of thanksgiving for all things said by "a certain holy man." We may also use this prayer to express our thankfulness to God whatever the situation:
“I know a certain holy man who prayeth thus. He used to say nothing before these words, but thus,
We give Thee thanks for all Thy benefits bestowed upon us the unworthy, from the first day until the present, for what we know, and what we know not, for the seen, for the unseen, for those in deed, those in word, those with our wills, those against our wills, for all that have been bestowed upon the unworthy, even us; for tribulations, for refreshments, for hell, for punishment, for the kingdom of heaven. We beseech Thee to keep our soul holy, having a pure conscience; an end worthy of thy lovingkindness. Thou that lovedst us so as to give Thy Only-Begotten for us, grant us to become worthy of Thy love; give us wisdom in Thy word, and in Thy fear. Only-Begotten Christ, inspire the strength that is from Thee. Thou that gavest The Only-Begotten for us, and hast sent Thy Holy Spirit for the remission of our sins, if in aught we have wilfully or unwillingly transgressed, pardon, and impute it not. Remember all that call upon Thy Name in truth; remember all that wish us well, or the contrary, for we are all men.
Then having added the Prayer of the Faithful, he there ended; having made that prayer, as a certain crowning part, and a binding together for all. For many benefits doth God bestow upon us even against our wills; many also, yea more, without our knowledge even. For when we pray for one thing, and He doeth to us the reverse, it is plain that He doeth us good even when we know it not.”
* Note: The prayer of the faithful mentioned above is presumably the Lord’s Prayer.
St. John Chrysostom, Homily beginning with Colossians 3.18-25 (Homily X), Homilies on Galatians, Ephesians, Philippians, Colossians, Thessalonians, Timothy, Titus, and Philemon NPNF, Vol. 13. Online here: http://www.ccel.org/ccel/schaff/npnf113.txt