Ok I know that staying together for your daughter sake sounds like the right thing to do but take it from someone who had to live through a similiar situation at a very young age. I was 9 when my dad finally left, and me and my sisters were happy when he did. I know that a 9 year old has a little more understanding of what's happening than a 1 year old, but still. I'm not sure how bad your relationship is, you said it was bad before your daughter was born and has gotten worse since, so not sure if you fight a lot or what, but I know when i was little and my parents would fight and argue & my sisters and i would set in our rooms crying because we didn't know what was going on. After he moved out we had a better relationship with him, he payed his child support and we spent weekends with him and I think that we were happier after the divorce. Again I know a one year old won't have an understanding of that, so you do have to consider that as well.
As for your wife I do think she deserves to know about the affair, however I know that's your decision to make and yours alone. If your worried how she'll take it when you tell her, think how she'll take it if your mistress tells her first!!!!! Something to think about. At least if you tell her, you can try to talk things out with her. Even if she won't talk to you right away she may come around. If you don't tell her and you want to stay with her, I'd say that the sex thing can be solved. Just set down and talk to her about it. Have someone watch your daughter for the weekend, and if money allows spend the weekend in a hotel just the two of you. I know sex is a BIG part of a relationship but it's not everything.
If you tell your wife and she ends your marriage, or if you just decide you can't take it anymore, you just aren't IN love with her anymore I say just end it. There is no use in continuing to hurt you both, and wasting your lives away being unhappy. Life is to short. You mentioned that your wife wasn't super hot, and your mistress was, that your wife was smart, but your mistress wasn't. There is such a thing of a hot smart girl! I would say try to find someone that you find attractive, that you have great sex with, and who is smart and successful. There is such a woman
Just try to find someone that makes you truely happy.
Good luck with everything.