How to shut down your own desire toward SO

I want to lose the desire, the urge, the attraction, the want to connect and have sex with my SO. This DB has hurt me so much that but I’ve accepted it. I don’t want to leave, I still want to be a good spouse, love them, but I just don’t want to find them attractive anymore. How do I do this without growing to hate the person? I have a lot of resentment, probably where this is coming from, but I just want to become LL4U and not have to worry about the rejection and urge to have sex.