Looking for advice/encouragement

So last year my wife told me that she wanted to divorce. Said that she could no longer play the roll. To be honest, I didn’t make it easy to be around me. Work got me into my head more than I should’ve let it. I lived in my head more than the moment and everything was irritating but I got the job to give my family a better life than I had growing up. We sold our home that we spent years working up to buy in a matter of days, we lived there for about 2 years. Then she moved into one of her parent’s empty home and I moved in with my mom and step dad into a small room that I share with my son when I host him. We coparent a soon to be 4yo. After a few weeks of being split up, she reached out and asked me to spend time with her and our son when it was her week to host him. She would invite me over for dinner and whatnot. We eventually became physically intimate again too. But it would only be on her weeks with our son. She would want/need help around her house and would hint at incentives for me to come help, she knows I crave physical touch, and I blindly did them. But it was hot and cold. She would send me pictures then stop, she would hug and kiss then stop. Sex faltered and fizzled too. I eventually had the courage to ask where we stood(last Saturday), after 12 months of hot and cold, and she said that we had just grown a apart. This was almost 3 days after she had kneeled down in front of me to give me oral, I told her that I didn’t want it because it seemed like she was going to take care of a chore instead of doing it from the heart. I’m completely devastated. I thought things were trending positively and then she pulled the rug out from underneath me. I’m reeling, I’m sad and upset. I don’t know how to process my emotions. Why am I sad to lose someone that clearly stated that she doesn’t want to be with me anymore. She said she tried to reconnect and find the spark but ultimately couldn’t. Did she use me? Was it on purpose or subconsciously? Why did I allow myself to get into the position to be hurt again? I’m just feeling lost. I want to be over her but I can’t help but think of the things that I did to help end our relationship. She used to be amazing and we were completely in love. I never pictured myself here. I know I faltered as a husband and feel like a complete failure. Am I sad about losing her or is it the happy memories we had that I’m sad about? I just don’t know