I totally agree with Kate. First, you and your wife need to work out what you're going to do. And believe me, you have every right to be angry and hurt.
If you both decide that divorce is the best or only option for you, then you need to work out custody. Whether you or she ends up with majority or sole custody, your daughter is likely to be confused for a while. The key things to remember are:
Your daughter is not a tool. Hopefully neither you nor your wife will use her as such. And both you and your wife will hopefully make a concerted effort to be civil to one another - and not badmouth the other in front of her (or to her!).
If you have joint/equal custody, no matter how much you dislike one another, you both should agree to the same set of rules between your homes - and enforce them. My husband used to see his ex's children every weekend - and every weekend, he'd have to undo the lack of structure they had with their mother. By the time he had them set back to rights, it was time for them to leave. That sort of inconsistency in early childhood especially can be detrimental down the road and confusing at such a young age.
Finally, no. I am of the school that doesn't believe that remaining in a lost marriage is beneficial for the kid. I know too many people who have done this and their kids have the most screwed up sense of relationships - family and otherwise. Kids know so much more than parents want to believe - and they see and pick up on the little nuances that we give off. Two parents who don't like each other or outright despise each other trying to pretend otherwise for the sake of children only teach them that lying is OK, being dishonest with yourself is OK, hurting yourself and others is OK - as long as it's done in the name of (and for) someone else. I had a friend who used to tell me that he and his wife had hallway sex all of the time - they'd pass each other in the hallway and say, "F**k you." They had two kids who are now entering young adulthood and both have the most warped sense of relationship values I've ever seen. That's just one example - and an extreme one at that - but I really think that staying in a marriage for your child if you know the marriage can't be salvaged (and you've both honestly given it your all to try to save it) is the worst thing you can do for everyone involved.
You'll probably also have to explain, in age appropriate ways, that divorce has nothing to do with your daughter. Most young kids take this burden on themselves and that's a tough thing for parents to deal with...but as long as you and your wife are age-appropriately honest and don't insult one another in your explanation to your daughter, you can help her work through this too.
Best of luck, Gary. It's a horrible thing to have to face and I'm so sorry for your troubles. I hope that both of you make the right decisions and put your daughter first and foremost if your marriage does break up - it definitely sounds like you are a great dad. For that, she's a lucky little girl.