I used both rigid foam sheets and poured liquid urethane foam in my build. I've seen many assertions that any foam will absorb water, and to an extent that is true, but it has a lot to do with how long you allow your foam to sit in water. A closed cell foam won't absorb water, at least on a short term. Closed cell jsut means that the bubbles that make up the foam haven't burst and thus won't allow water in; as opposed to open cell foams that have burst bubbles and will soak up water, like a sponge. However, water is the universal solvent, and if you let your flotation compartments fill up with water and the foam to sit in the water, over a long period of time it will eventually break down the foam. This is quicker in cold climates where you experience freezing over the winter. The water freezes and ruptures the cells of the foam, then thaws and absorbs into the now open cells only to refreeze and rupture more cells.
The best way to combat this is to make sure your foam stays dry...at least until you need it to float your boat. A majority of my rigid foam was installed under the nose of my boat on the upper deck, which will keep it out of the water. For my liquid urethane foam, I lined the bench I poured it into with plastic sheeting to provide a barrier between the foam and any water that made its way into the bottom of the boat. I also made sure the limber holes through the bench were clear by putting sticks through them, so that water can drain away to the bilge plug. I always store my boat with the nose as high as possible and the bilge plug out; that way if water does get in, it will drain away from my foam and harmlessly out the bilge.
As an aside, the plastic lining came in very handy when I inadvertently used an expired urethane foam that didn't expand to the proper density. All I had to do was lift it all out wrapped in the plastic sheeting; I'd hate to think what I would have had to do to get it out if I hadn't lined the compartment.
Richg99 is right, anything that will displace water in a large enough volume to float your boat will work for flotation. Foam provides a more resilient flotation, whereas a sealed compartment or 4 sealed milk jugs have a greater possibility of failure. A foam has a lot of small closed cells and even if you damage a block of foam (break it in half, stab it with a knife, etc.), it will still provide significant buoyancy. Whereas, if you poke a hole into a sealed compartment filled with air, it will lose all it's buoyancy, and poking a hole in one of the 4 milk jugs will result in losing a full 1/4 of your buoyancy. I think that is why USCG doesn't allow manufacturers to used large sealed buoyancy chambers to meet their flotation requirements.
As to mice, I've heard that the pool noodles (polyethylene) doesn't get touched by rodents, but I haven't had any experience with that myself.