A commenter on Reddit plays out the scenario if Gandalf kept the ring:
“Gandalf would be more like Mao, I think. He comes onto the scene as a conquering hero, overthrowing the Shadow in the East and promising a return to peace and prosperity. For a time, it works. He sets about showing the world how to order itself without the threat of a Dark Lord to rule it. A cult of personality springs up, and Gandalf is worshiped as the great savior of Middle-earth. His wisdom spreads throughout the land in the form of a Red Book, composed by his closest friends, the Halflings. He continues to go by names others have created for him, a sign of his humility, and so he is known still as Mithrandir, or Gandalf, or Incanus, or Tharkun.
“He finds the task difficult. Early on, he sticks to the restrictions of the Istari, trying to lead by example and persuasion, rather than by force or command. But over time, the ordering of his great realm, stretching from the Tower Hills to Harad, proves too much. Shadowfax grows lean and rebellious as Gandalf rides him too hard, for too long, responding to small crises all over the continent. Wherever Gandalf turns his attention, though, things prosper. Projects are streamlined, the poor are fed, fields are planted and harvested to unheard-of bounty.
“But he cannot be everywhere at once. After a time, Gandalf convinces several of the Fellowship to go to different parts of the continent, to rule there in his name. After all, they knew him best, and can carry the wisdom he has to the furthest reaches. He sends with each of them a palantir. It grieves him to separate old friends like Frodo and Sam, and they feel totally under-prepared for the tasks before them, but with Gandalf a mere palantir-communion away, they go. And after all, how can they deny Gandalf? Just being in his presence, they feel compelled to follow his requests. They are, after all, perfectly reasonable ideas, and only the Fellowship can be trusted to implement them.”