what did I do wrong?

I have been with the same person for 11 years and been married for 3 years. We have a house together which I have paid for. I bought a car for each of us to use for work. I have pushed aside opportunity for a promotion a lot of times because we loved this town we're in, since we are both born and raised here. 
I was out of town for 3 days for an interview/assessment to get a promotion because I finally realized I want to start a family. I want to be financially ready. I did get the job. And I went back to our home and found her crying, just crying on the bed. I pleaded to know what was wrong but she just cried. She then stood up and left saying she's going to her mom's house. I told her alright give me a call when you get there but I did not receive any call. I was confused and a little worried so I decided to call her mom. Her mom said that she's not there and that she was at a friends house. 
Something was very wrong.
I went in the guest bedroom and found my laptop open with her facebook logged in. This is where it broke my heart. She had been talking to a guy who works at the same company different department for months and had been talking about me and how she's going to "tell me she can't do it anymore." There also messages saying "yeah he thinks the dog is our child how pathetic. I will tell him soon" 
This woman who I have been with for 11 years, who I have married, who I wanted to have a family with did this to me. After she cheated on me once before and said she did it because she wanted to be engaged and married so I did because I didn't want to lose years of being together. I didn't want to restart. 
She told me she was unhappy that's why she cheated. She said she wanted a family and I can't give it to her (we have been trying for 2 years). For all I know our marriage was fine we did not have any arguments about anything for the past couple of months. I didn't know this is how she was feeling. 
I did follow through with the divorce and she said she doesn't want anything from me since everything in the house, I paid for. 
She called me crying afterwards blaming me. Called me again if she can have the other tv because I have 3. I told her no. She begged. I told her that she said she didn't want anything from me, if she wants we can take it to court. She said that she can't afford a lawyer. And I told her but I can and she hung up. 
****************************************************
We used to use this app to notify when her period was going to be on so I know what to do when I see her. Whether to just give her space or give her attention. 
And she used to read posts here about how hard it is to conceive and by doing so, she didn't feel alone. I will be uninstalling this app since she is using my Apple ID and I'm paying for this. I just want to share this here because this app had been a part of our lives.