But it was he who decided to admire "god". Light didn't force him to join the party. So it was his
will that was following Kira, and his will that helped Kira in time of need. Kira needed
someone like Mikami. And it was Mikami's choice
to help him and he retained his own right to make decisions; it was his decision to take out the notebook at the precise moment. Yes he was an instrument for god, but he did everything according to his own
will with his own
decisions, especially considering that Light trusted him to make the right decisions in the end.