This is always a trying time for a community. Part of the family leaves and a power vacuum is left behind. As can apply to a lot of situations in life, not just this, don't make major decisions during disruptive times. Allow a cooling off period for the community to return to normal before even thinking of replacing those moderators that left.
It may mean extra work for the site owner / moderators that are still here, but this is a difficult time for the entire community and this is an opportunity for those still here to come together and help each other. Being a little lax on the rules probably wouldn't hurt here, maybe giving a few more warnings before that temporary ban then you normally would. Maybe let the odd comment slide that you'd normally be straight onto.
As the community shows signs of recovering and moving on, start to tighten up on rules again and discuss the possibility of moving several members up to moderators. If you're on your own as site owner then perhaps you're discussing this with several members of the community, or the community as a whole. If you've got some moderators left then maybe it's just discussing it with them. This will all depend on your community. But soon after you should have your new moderators and things will be moving on and your community (hopefully) has survived the rift.