Well, Russia NEEDS both Europe and China, in the future. Russia ONLY has a future, if she is able to become the land bridge of trade, and transportation to the greater Eurasian overland trade and transportation network. If Russia sours her relations with either Europe or China for good, she is either digging her own economic grave, or condemning herself to long long term poverty. Hydrocarbon energy is NOT the future.
Russia needs to be the guarantor of Eurasian trade, transportation and logistics, in addition to energy and resources provide. Or else, she will just rot away.
***** (i rather not name who it is) would hate to see this happening, therefore would want people on this route to hate each other and fight with each other, this is why you have Azov, Aidar, etc. I personally don't harbor that much hatred, fear or ill-emotion towards them, because if you read enough history, you will know that such militant tribalism and ultra-nationalism is nothing rare in history. It's not that such thing is not evil, it is because humanity is intrinsically evil. Our job as civilized entities, is to alleviate the suffering and pain that our evil nature will inflict upon our collective Self.
Therefore, if this war is fought with purpose to bash the effort of *****(I rather not name who it is) to sour the overland trade route and transportation route of Eurasian, than Russia is safeguarding her future and the future of the world, therefore she will come out intact. However, if this war is fought with any other reasons, than Russia is digging her own grave, EVEN IF she has won this war.
EU membership for Ukraine is bad for Russia, ONLY because it would put Russia in an even weaker bargaining position when deal with any EU-Russia trade issues. But ultimately, Russia and the EU both need each other. In fact, I've always thought that Ukraine's membership into the post-Brexit EU will actually put Ukraine under a stronger and more moral constraints of the EU's shared value system and governmental guidelines, as well as more subservient to the economic need of EU: which really want good trade relations with Russia for her cheap and abundant energy and resources, as well as overland access to Central Asia, South India, Arctic Ocean, and ultimately to East Asia.
In simpler words: if Ukraine is in the EU, she will need to tone down her Russophobia and ill intentions towards Russia, in order to safeguard EU-Russia trade and co-operation for EU, in exchange for economic prosperity as well as security guarantee (to an extent). An Ukraine outside of EU, will simple be an economic rogue state: if you don't give her what she actually needs (prosperity and security), she will be forced to jump the gun and giver you a lose-lose outcome.
NATO, however, is a totally different animal. Russia's action already shown Ukraine the danger and consequences of pursuing NATO membership. Now, if Putin has any strategic foresight, he will make NATO membership a red line, and condone a EU membership at the same time. This will also add on to the effort and decisions of France and Germany to increase their military spending and ever stronger call for an "EU Army", which will be a parallel (and thus, competing) entity of NATO, to an extent. At least this will turn NATO from a mono-centered (US-centered) entity to a somewhat dual-centered (US-center plus EU-center) entity. This would be a strategic move by Russia, with many many strategic benefits.