I think it was after Tanya was injured in the explosion (he thought Tanya might die)
Suddenly he understood a lot of things that he didn’t understand before< /p>
Didn’t you read what he said to Vasily before his sacrifice: "I am so stupid, Vasily. People are just people, there is nothing special. We strive to create an equal society, okay Let everyone not be jealous of others. But you will still be jealous of a smile, a friendship, something you don’t get but value it very much. In this world, even in the Soviet Union, there is a gap between rich and poor, some are talented and some are talented. Those with low status; those with deep love and shallow love."
Tanya's "death" made him feel sad and angry
At the same time, he was jealous of Vasily before. When he saw Vasily and Tanya kissing, he asked the typist to make slanderous remarks about Vasily) and felt deeply ashamed
All kinds of emotions led him to sacrifice himself at this moment in exchange for justice
This is my superficial understanding, haha