If the case is still pending and you divorce that would be the end of the case since the relationship that the visa application is dependant on no longer exists. If you file for divorce and hte divorce case is still pending than the case can still go on. Of couse, USCIS doesn't like that and often bogs those cases down until the divorce is final and then denies them for he reason above. My suggestion is that since there re two children involved and I assume you want them to have access and be raised by both parents you really need to discuss the specifics of your case with an immigration attorney before you file anything.