Great question, And just reading the scenarios gets my heart pounding !
I was in a similiar situation,this is what I did to get through it.
The situation was, I had departed Annapolis,MD. summer day,5-10knt. winds,1ft.waves sunny, was motorsailing,from the galley the crew informs me there is 2-4" of water on the galley sole. I gave the helm to my 1st. mate went below to see .
Grabbed my emergency portable pump and put it to work. Then opened the engine compartment to locate the source.
As it turned out , the main bilge had failed and was siphoning back into the
bilge,due to the proximity of the bilge through hull being near the waterline on the stern,when I motor the stern squat's just enough to submerge it. Alot of water comes through a 1" hose!! I shut down the through hole valve which stopped the siphon. After which I replaced the failed pump installed an anti siphon valve and made a note in the repair book to move the location of the through hull .
There were a number of other vessel's nearby and I was towing the dinghy, but the thought of sinking was still a bit more excitement than I would prefer.
Definetly a scenario that needs to be considered and planned for,because when it happens it is frightening.