Let's say Putin's core objective is 'not letting US win' - this is the only thing he cares about.
War goes badly, but this core objective doesn't change. If he wants to achieve this objective, armageddon would achieve it - everyone loses, so US doesn't win. That is better than Russia loses, US wins, so it is rational in this frame to push the button.
He can't get Russia winning by a nuclear war.
The larger problem is that he is increasingly surrounded by people who tell him what he wants to hear, not what is true. That might lead to a situation where he thinks Russia can win by a nuclear war.
We are in a serious policy vice and the odds of him resorting to a nuclear demonstration are non-zero and grow by the day. Even the best outcome of that scenario likely means a massive proliferation crisis as countries around the world put plans into effect to join the nuclear club ASAP.
So Russia as a functioning society is destroyed in the inevitable counter-attack. How does that benefit Putin? How does that allow him to go on living in the way that he clearly wants to?
In the 2000s he probably would have felt somewhat safe losing power. I think after that video his attitude was probably that if Russia loses its military power and he loses power in Russia he will die a messy and horrible death.
And hes been in this state for over 10 years now. Theres probably some truth to the notion that COVID isolated him but I think Libya contributed most to his paranoia.
Im pretty sure this puts nuclear weapons strikes on large population centers on the table.
Edit: I can see how it might be rational for Putin to threaten to use nuclear weapons. But I can't understand how that extends to actually using them.