I think it's better to part because the child will be able to live with mother's guidance and affection
because a mother is better than a father
You can't know that for sure. Even if the man/woman is a bad husband/wife it doesn't mean that that person is a bad parent. Kids need both parents. It's a very tough decision to make. It's probably best to try working it out somehow. Separation can help if some kind of abuse is going on.