Before you can treat someone or begin recovery of any equipment, you must first reduce the risk of injury to yourself. The best and easiest way to do this is by switching the power off at the mains box.
The most important thing to note is that you shouldn’t have to do this step if your RCD (Residual Current Device) and circuit breakers are working. These will cut the power the moment they detect a danger to personnel or equipment (respectively). You should, however, always check before entering the area that the power is off before entering.
And even if you do not need to enter the area to do something, you should still always make the area as safe as possible, to prevent further damage or injury, especially if there is a risk of someone unaware entering the area.