If Putin does escalate to openly waged warfare against Ukraine to take eastern Ukraine, Ukraine needs to do three things: preserve the Ukrainian army; wage irregular warfare in eastern Ukraine to stress Russia's still-inadequate ground forces; and strike Sevastopol.
If Putin truly does believe that he is in the position of needing to add eastern Ukraine to Russia just to survive politically, how should Ukraine respond?
I looked at Russian invasion options before Russia pulled back their massed army. With far fewer Russians massed now, Russia's options are initially more limited to eastern Ukraine.
One, Ukraine cannot risk their army to hold that far east in Ukraine. Ukraine is doing well projecting power to grind down the increasingly well-armed secessionists and their Russian masters, but against Russian conventional power, that would be a foolish mission that just risks the army close to Russia where Russia can best destroy Ukrainian conventional forces and then exploit to drive deep into Ukraine if need be.
Ukraine would do better to preserve their army to maintain it as a threat to Russia's army in the field.
Second, with an army in being poised outside of eastern Ukraine, Russia will have an even harder time pacifying eastern Ukraine as Ukraine denies Russia the ability to completely disperse their army to hunt Ukrainian irregulars and militias fighting the occupation; and as the regular forces funnel supplies and men into occupied eastern Ukraine to resist the Russians.
Third, as I noted in the first point link, Ukraine needs to put at risk the major gain of Russia's aggression against Ukraine--the Sevastopol naval base.
Ukraine should first declare the port--as it is legally their port and not a Russian port to be blockaded--closed for all shipping.
If projecting Russian power around the Black Sea and into the Mediterranean is so important to Putin, Ukraine needs to wreck the port.
Ukraine should burn air power trying to hit targets in and around Sevastopol. If we can help Ukraine get long-range missiles to avoid losses, that's great.
Long-range surface-to-surface missiles should be the main weapon and used to bombard the facilities and ships in port.
Planes and what's left of Ukraine's navy should attempt to lay mines off of Sevastopol.
If Ukraine is really ambitious, they could take a fourth step and attempt to seize Russia's Transdniestria pocket in the west as a bargaining chip.
If Putin decides to go to open warfare to redeem his fortunes, Ukraine needs to make sure that the war is neither short nor glorious for Putin. Survive, drag out the fighting, and inflict losses on Putin's forces. And let the oligarchs squirm some more.
UPDATE: And when I say, "if Putin invades," I of course mean an open invasion. Even though Russia has fewer troops near Ukraine, these troops crowd the border allowing them to ship in weapons, fire artillery into Ukraine, and slip their own men across to wage a war that Putin denies he is fighting.
One Russian soldier's selfies give away more information than Putin is willing to admit--until the medals are awarded, of course.