Anakin was an idealist. In his discussions with Padme throughout the movie, it's clear they both want an end to the war, and to galactic violence. In his arguments with Padme near the end this is still a very strong motive, though he is of the opinion by this time that a good dictator might be able to achieve the same end much more quickly while she believes democracy is the best way to go.
He knows that Padme desired peace as well.
With his friends dead or effectively banished, his wife and children gone, the only thing he has left to pursue is this ideal that he and and Padme both desired. He may not be interested in pursuing it the way she would have liked, but it was still a desire in himself, possibly buoyed in part by the knowledge that she, too, desired peace and stability.
Further, he was still the apprentice of Palpatine and Palpatine saved him from Obi-Wan's seeming betrayal. The only person in the universe now who could seemingly understand and mentor him was Palpatine, and Anakin was still a teenager at this point. He's hardly able to make reasonable choices in the absence of good counsel. Also, his life, at this point, was in the hands of the empire. The technology to keep him alive wasn't something he could simply cart with him to a rim planet and live out his remaining days at this point in time. Perhaps as he grew in power and in later movies he would have been capable of breaking away, but at this juncture it would have been a death sentence.
Lastly, he gave himself fully over to the dark side. The act of killing the sandpeople in revenge for the death of his mother was only a small step. The act of killing men, women, and children in the Jedi temple for a cause he believed in sealed him to the darkside. Leaving the grip of the dark side at this point would have taken a significant act - that of killing his mentor Palpatine in order to save his son Luke, for instance.
In fact, the emperor knew that only Padme herself or Anakin's children would ever be capable of saving Anakin - which is why, once he learned of Luke, he worked so hard - moving heaven and earth, so to speak - to convert Luke.
I accept that once you go dark you never go back, but why did he keep working with/for Palpatine? Surely he would have eventually realized that Palpatine had manipulated him into to this situation.