Anakins decision and confusion
Thinking about Anakin on a psychological level, when Palpatine was shooting lighting at Mace and Palpatine was getting deformed, Palpatine says "Anakin, Help me". Anakin understood these words from the vision he had from Padme saying the exact same words prior to this. Padme cried for help in the same way. Anakin, who is so heartfelt about losing Padme, he would do anything to prevent her from dying. When Palpatine said "Anakin, Help me" he thought back to Padme saying the same thing and saved Palpatine. He answered to his cry like he would have answered to Padmes cry. After he cut Maces arm off, he realized what he done and he was so confused with these strong feelings. I think that is why he did it