Usually when you encounter flooding you can just hold your breath and try and make it through. Make sure you close any hatches nearby so that the water doesn't fill up whole sections and make your life even worse. If the flooding is so bad that you can't make it through, you might want to use an Engineer party member (which can be yourself) to get in there and patch up whatever leak is letting water in.