If you have an indication as you describe, SOP goes out the window. Leave gear extended, unless a greater emergency (such as inability to climb) dictates otherwise. I am surprised that the FCOM does not advise on this.
Normally performance does not assume compound failures, ie it will cover failure of either one engine or gear retraction, but not both. Engine failure would degrade performance more than leaving the gear down.
But, to achieve a safe flight path with gear extended, flying the OEI departure may be preferable to staying on the SID.
Of course if you are having a bad day and an engine swallows whatever blew the tire and fails, you do whatever it takes to not hit the ground, which may well mean retracting the gear.