WmJas Tychonievich recently published some interesting discussion of the business of thanking God. In particular the question of what exactly we are thanking God for.
Here is my take on the question.
I believe in a pluralist universe of Beings existing in an original state of disorder, or 'chaos'. This was the primordial beginning, until God began his work of creation; since which time, God's creation has been growing; and Men have become 'created-Beings' in relationship, a part of divine creation: 'Sons of God'.
So, in an ultimate sense, it is always right for those who regard divine creation as A Good Thing to thank God for creation - and therefore to thank God for everything meaningful which is possible because of creation.
This is true regardless of the proximate cause of an event - of who are what caused it - so long as something of divine creation was involved in it.
However, God is not responsible for every-thing that happens everywhere, in the sense that primordial chaos continues to exist; and in this mortal and material world, chaos/ entropy dominates and has the last word.
God's creation can be imagined as an expanding domain within chaos - with two stages.
I envisage two coexisting kinds of divine creation: first this mortal world, which must continually be created in order to continually overcome the tendency to revert to chaos. And secondly Heaven, which is the domain of those Beings who have made an eternal commitment to live by love - and who thereby overcome chaos/ entropy wholly and everlastingly.
It is the work of Jesus Christ to enable Men to make the choice of eternal love, hence eternal life in Heaven.
(Mortal life and Heaven coexist, because mortal life is where Beings are enabled to make the positive choice for heaven; but Heaven was first created - initially as the domain of God only. The core purpose of creation is to 'people' Heaven with Beings who have chosen to live by love, eternally.)
In God's creation are two types of Being: Good and evil. Good are defined as those who (sooner or later) endorse divine creation and choose to join-with it (in Heaven). Evil are those who do not endorse divine creation; who reject creation - and reject Heaven.
Those who reject divine creation ally themselves with primordial chaos (because that is the only alternative to divine creation); and endorse the destruction of creation - of any-thing created.
Therefore, this desired destruction includes (eventually) willing the destruction of their own status as Sons of God. This is entailed by desiring to delete creation and return to chaos - to the situation where each Being except God subsists in total isolation and minimal consciousness - which is the nearest to annihilation that can actually happen.
Those who oppose creation cannot affect Heaven - Heaven is eternally immune to chaos, has completely excluded it because all Beings in Heaven live by love. Those who oppose creation can only operate outwith Heaven; for instance in this mortal life on earth.
My first conclusion is that only those who endorse divine creation and who wish to dwell in Heaven are in a position from-which they would rationally thank God at all.
By contrast; those who do not believe in creation, do not believe-in or support the will of God, those who intend to refuse the offer of Jesus Christ to enable us to enter Heaven... all such would Not want to thank God.
But is it rational for those who endorse divine creation to thank God for everything? The apparent problem arises because in this earthly mortal life there is a class of causes deriving from entropy, hence tending to chaos, and working-against creation. Such causes are not of divine origin.
It might be supposed that it therefore makes no sense to thank God for events that have not-creation, indeed anti-creation, causes?
Yet even such events are a part of creation; because all knowledge entails creation. We could not 'thank' at all, were we not created-Beings - parts of divine creation; because uncreated Beings cannot give thanks.
We could not identify any 'event' for which we might choose to give thanks, were we not already created Beings - because there is no knowledge in chaos, and chaos does not know 'events'.
My overall conclusion is therefore that it is never wrong for a Christian to give thanks to God, because ultimately all depends on God's creation; but a Christian may err in ascribing some specific event to God's will - since there is evil in this mortal world, and many events come from the creation-destroying will of evil Beings.
Therefore it must often happen (in this earthly mortal life) that Christians thank God for some-thing which was (in fact, were we able to discern) caused by chaos or by the Beings which reject God. In other words; a Christian may thank God for some evil.
...Indeed, if public prayers in church are any guide; this happens all-the-time: self-identified Christians thank God for evil - by regarding that evil as Good.
Whether this matters spiritually or not will depend on the situation and on the consequences. If a Christian ascribed some evil to God, and thanked God for this evil - this would presumably be a sin that needed to be repented.
God would then ensure that the individual would later be given the experiences and chance to learn that their thanking God for this particular evil had actually been a sin.
But whether or not that chance of repentance was taken would depend on the individual's discernment and choice - would depend upon his true underlying motivation. If his motivation is for God, creation and the Good - there would be no problem: he would repent his sin.
But if he doubled-down on the sin of ascribing evil to God, if he refused to learn and repent; then he would have taken the side of the Enemy, against God; and being against God he would presumably, after death, reject salvation and choose damnation.