Hi,
Here I see the safety problem...it needs to be connected between one live wire and EARTH GND.
* if wrongly connected then the relay is continously ON...continously current flow to earth GND.
If EARTH wire is broken then ALL in house EARTH connections carry live voltage.
For safety reasons i'd limit the EARTH current to below 0.5mA with double safety. Two properly selected, each rated for full voltage, in series. Maybe driving an optocoupler. Or a MOCxxx device.
Then a triac driving the relay, supplied by L and N.
How often does this happen? Is it worth the effort?
Take care of safety regulations. Here in Germany it is not allowed, or at least critical, to switch N.
Klaus