Whilst yes, to the letter of the law it is indeed illegal....but I would hope (as happened to me) that a sympathetic police officer would appreciate the driver of the vehicle is doing what he can to alert other road users to the presence of his car. As long as this is for emergency use only and not on a constant basis.
I had this in one of my old company cars, both bulbs blew at the same time when I turned them on to attend a call out at work (being the deisnger of the equipment that had broken down causing an AoG incident (Aircraft on Ground) I had to attend) and it being late night, and needing to use the motorway, I was stopped by the plod and asked me to turn on my dipped beam and switch off the fogs....I explained and showed that te lamps didn't work and I thought it best considering I would be on a motorway to at least do my best to illuminate my vehicle for the benefit of other road users.....they shrugged and said, sounds fair, just get them repaired.....
And off we went.
So while illegal, I would hope common sense would prevail....