That’s a good catch, that moment of Anakin making peace with his death.
It may be more blatantly selfish, but fear of his own death could work as a motivation for Anakin’s fall, or rather having it rolled into his primary motivation of saving loved ones. It could be just a general desire to control destiny and reshape it to his will that seduces him to the Dark Side. That feeling that, within a chaotic galaxy, he needs to force things to be a certain way to keep him and his loved ones safe, and this would draw him to the sense of order offered by the Empire.