I've recently been through a similar fight - as a man you can win but it is difficult. In all likelihood you will get joint custody but one of you will obviously have more time with the children than the other.
My wife left me and moved away to be with a new partner and tried to take the children with her. I had to fight this in the courts as the children made it very clear they wanted to stay with me, live in the same area and stay at the same school.
What you need to do is ascertain who the children would prefer to live with - this is the key along with not disrupting their normal lives too much. If you can keep them at the same schools, in the same house etc you have a very good chance. You will really need to get CAFCASS behind you and also get yourself a good family solicitor and possibly a barrister to represent you in court. If you can get CAFCASS to back you then you will be pretty much home and dry in court as the judge tends to listen to them more than anyone else.
Good luck. Its a really crappy battle and will probably go on for months so prepare yourself for some difficult times ahead.