What makes you so sure it would be Ukraine Russia would choose to kill millions from? They have said they want to do it to the UK several times.There is no way Russia can avoid defeat. Clearly the Russian army can't compete effectively against the Ukrainian army and the Russia economy has already begun to contract because of the sanctions which will continue to increase.
The use of tactical nukes against military targets will not change the course of the war and if Putin decides to kill 20 or thirty million people in massive nuclear strikes against the civilian population, it will seal Russia's fate as a pariah state for the foreseeable future.
The only real question here is, how much damage will the Russian people allow Putin to inflict upon the state of Russia before they get rid of him?