Giving thanks should not depend on feelings. Job still spoke out his sincere gratitude even though the circumstances that he faced supposed to remove his gratitude.
and said: “Naked I came from my mother’s womb, and naked I will depart. The Lord gave and the Lord has taken away; may the name of the Lord be praised.” (Job 1:21)