If you are considering leaving due to physical, emotional or mental abuse, then you can't afford not to.
If your situation is not critical, then consider the pros and cons.
Consider relevant questions such as the following: Do you have your own income or savings to see you through until the divorce is final and a settlement is reached? Do you have enough resources to provide a decent life for any minor children you are responsible for? Will you lose your entitlement to any funds or property if you leave?