Thomas, I think, is one of the most psychologically complex people in the new testament right up there with Peter, Paul, and John. Simon wasn’t outright denying that Christ had risen from the dead. The exclamation of Thomas was one made out of fear. He was zealous for his Faith. He clung to it, and Christ, with fervor. This is exhibited in John 11 when he says that they should go with Christ to die with him.
Fast forward to the Crucifixion. This man who was so on fire with zeal for God abandoned his Lord at the first sign of conflict. In his mind, he abandoned his Faith. After the Crucifixion, Thomas is wallowing in despair. When he hears that Christ is actually alive, he is afraid to hope, to believe, that he may have a chance to redeem his desertion. He is scared because to regain hope only to have it crushed again by finding out that Christ wasn’t actually alive would have destroyed him. This is why Thomas doesn’t actually put his finger into the nail wounds and his hand into the side but rather declares with love, “My Lord and my God!”