Generally, you have to physically remove the switch and put it back in again.
You do that once you're sure that pressure is gonna be equal on both sides - like, the red and the blue in this pic.
And then hope that either of the pistons in the brake line junction haven't sheared the pin off of the brake failure switch.