Thomas believed he was God.

you can't turn anything in the Gospel of John against this:
"But these are written that you may believe that Jesus is the Messiah, the Son of God, and that by believing you may have life in his name."
(John 20:31)
"these are written" includes the words of Thomas and it is clearly stated what you should believe for to have life