There is a saying, attributed to Napoleon, 'never get in the way of your enemy when he is in the process of destroying himself'. Putin may score points at home by annexing the Crimea and invading Ukraine. Internationally, however, Russia moving towards becoming a pariah state, like Iran, North Korea, or Libya under Qaddafi. He's invaded and annexed part of his neighbor, shot down a civilian airliner, imprisoned political opponents, clamped down on free speech and murdered journalists, criminalized having a different sexual orientation. If the long-term goal is to politically isolate Russia, to help contain Russian influence like during the Cold War, well, Putin is doing a fantastic job of it.
War has been called "politics by other means". Putin has launched this war because he is desperate not to let the Ukraine fall into the Western political sphere- probably the best analogy would be the way the U.S. got defensive about having communist governments in Cuba and Central America. At best, he'll manage to carve off the eastern edge of Ukraine to create some tiny, pro-Russian buffer states. In the process of gaining this territory, Russia will isolate itself and its political sphere of influence will shrink. Putin will never give up power, and the West will never trust him again, so we could be looking at another 10-25 years of this sort of behavior, before eventually someone succeeds him and tries to normalize relations with the West.
He may get all of Ukraine and as far as becoming a pariah state, I don't think he cares. In real terms, with all the nukes he has it doesn't really matter if he's isolated or not. Of course this mess only complicates any future more serious mess that could have very real consequences to people and families in the west. As serious as this matter is, the next one will be much more serious. Choices and decisions made now will have consequences years and decades down the road.