“Home is where the heart is.”-- anonymous
Don't move out of your home if it isn't your fault
If your spouse is filing for a divorce that you don't want and isn't your fault and isn't good for your kids – then don't move out of your house, or even move out of your bedroom. Don't let your spouse give you the line that "Divorce is always two people's fault" or that he/she had no choice to except to have an affair and divorce you. It might not be your fault at all. If not, don't feel like you have to move out to keep the peace, as long as violence can be avoided. Moving out is NOT better for the children – they like to have their mother and father living together with them as long as possible even if it is no longer a real marriage. In some states and some situations, one spouse can file to claim exclusive possession of the house, but in most of those cases you can have a lawyer to counter-file and it won't be easy for your spouse to win this. Stay in your own bed, even though it might disgust you to sleep in the same bed as somebody who is cheating on you – remember that this is your home and you can sleep wherever you like. But know the laws about domestic violence in your state, and stay on the safe side of any actions which might conceivably be interpreted by a lawyer as "domestic violence". It will be very tough and you will need a lot of self-control to avoid any appearance of violence or abuse, but eventually your spouse will need to make a choice between staying in the home and giving up on the divorce, or moving out and giving you a big advantage in the coming custody fight. Most states require a period of physical separation before a divorce can be finalized – if you don't give that physical separation to your spouse nor does your spouse leave, then the divorce will end and the marriage will continue. If your spouse is having an affair, the boyfriend or girlfriend will get frustrated when your spouse doesn't leave you, and then either the affair will end or your spouse will move out and leave you with the home. The children will most likely want to stay in their home, though this is not a given and it would depend on their ages. A marriage that continues only because the divorce failed is not a good marriage of course, but with time and work it could be fixed and this would be best for your children.
Leave your marital home only if you were at fault in the divorce.
Let the kids stay in their home -- Nesting
In most states, parents cannot file for custody until after they are separated. Since the custody case will take at least a couple of months to go to court, that means that there can be a period of time when you and your spouse are separated but there is no custody agreement. If your spouse who started the divorce moved out of the home, hopefully she or he didn't take the kids out of the home as well. Divorce is a very difficult time for kids, and hopefully they can stay in their home for a time before the courts force them to be shuttled back and forth between two homes. If necessary, you can propose the concept of "nesting", where the kids remain in the marital home full time and the parents take turns living there. This is much easier for the kids, though more difficult for the parents. If the other parent is the one who caused the divorce and insists that divorce won't be hard for the kids, then the other parent should have no reason to object to nesting. It would be good for him or her to have a taste of what the children go through in most divorces.
But eventually your spouse will settle in a new home, and will demand a schedule of when the children live at that new home. The court will give it to them, and the only question will be how often and on which days.