You can be thankful for evil if it finally opens your eyes to it.
Spend some time with members of AA. Many (most?) of them would not have come to their senses if they hadn’t reached rock bottom at some point.
Not all of us can see or appreciate God’s grace immediately. Some of us have to drink the evil dregs to the bottom of the cup before we can appreciate it.
Like you said in your post it is God’s Grace we should be thankful for, not evil. God’s Grace lets us see evil for what it is. Without it would we never see the evil. Evil cannot produce good in men, only God can produce good from evil.