The battery is meant to prevent the player from staying on the same floor for too long.
There's no way to recharge it mid-floor. It gets fully recharged after you enter the next floor.
You shouldn't linger in a floor because, after the battery runs out, the floor gets much darker and ghosts from every floor will spawn endlessly (after the room is cleared normally)