This is a common misconception among people, I hope it will enlighten your thoughts.
When to use “Thank God”:
“Thank God” is actually a shortened version of “Thanks be to God” which means that you are telling the others (your friends or whoever) that you are thankful to God.
“Thank God” is in the same way as “Praise God”.
“Thank God” is also correct because you are using “Thank” as a verb I (we) thank God.
You are praying or directly conversing with God, then you would say “Thanks, God”.
“Thanks, god” should actually mean “Thank You God” if he was in front of you.
“Thanks” is an informal way of saying “Thank You” so highly unlikely to use “Thanks, God” to an almighty being.