The Imperium wouldn't permit it to happen. They would defend it only slightest less than Terra itself and actually might do just as much given the proximity.
Considering the Titan Legions, Skitarii, and hordes of Tech-Guard -- whatever crushed Mars could theoretically crush Terra. So my belief is the Imperium would launch the entire Battlefleet Solar, hundreds of Astartes Chapters, the Titan Legions, and billions of Imperial Guard to hold Mars -- no matter the cost.
Now if you're questioning what happens after the war and its assumed Mars is held but everything is utterly ruined -- the effects would be more techno degradation by the Imperium. A number of STCs would simply be lost along with the home bases for a number of titan legions. The production responsbility of Mars is rather high and this would be put additional strain on the entire Segmentum Solar to compensate.
Not to mention that the Sol System, already pretty much a fortress, would be doubled in size (manpower and ships) and be turned into a fortress even more. Mars would likely be rebuilt, Tech-Adepts brought from other of the more powerful Forgeworlds to restore it, but it'd never rival its old self.
In short, the Imperium would never recover completely from the damage. It would get to a nominal level of recovery, enough to keep the whole Mechanicus structure firm, but it would never be the same.