For a safer setup always step it down with a transformer.
That's true, of course, and other hints like
-" use resistors on both power wires " or
-" don't setup those resistors on a breadboard, but aways keep the power line and resistors isolated "
-" two 47k resistors in series is safer than a single 100k "
are very bad, because either you don't need them or you should not be encouraged playing with mains
That said, you can either smooth the signal on pin 4 electrically or have a "software solution" :
Power is OFF when digitalRead gives HIGH for more than ~10 millis
You could even use the pulse frequency to compare the accuracy of Aduino's clock with the 60 Hz supply ...