Personally for me the marriage would be over. I'm too visual of a creature which means I could not look at her without thinking about her sleeping with my friend or any other man especially as she puts on pregnancy weight.
Having said that there are two schools of thought.
Find out what led her to cheat on you. And if you can in any way acknowledge your treatment of her may have had something to do with it then you might be open to forgiving her. Going forward you also need to find out what she intends to do. Does she plan to go full term or not? Remember it's a (woman's right to choose). You have no say. Make sure that you have it in your heart to truly forgive her if you intend to stay. Ask yourself, Would I be able to look at this child and not get angry? Could I deal with my friend coming over to visit his child or pick him/her up on weekends? Remember your friend will always be apart of your marriage indirectly if he opts to be involved in the child's life.
Should you decide to end the marriage the next step is to legally protect yourself. In a lot of states they practice the "What is in the child's best interest" rule. If a child is conceived during a marriage many states will hold the married spouse responsible for financial support. Other states allow up to two years to contest paternity. Research the laws in your state.
Each of us is entitled to have our own "deal breakers". No one can make this kind of decision for another person. For some people love conquers all.