Confused, like I said and sandi said, the sex has to go. Unless you are happy with an open R, you need to draw a line in the sand. Me or her.
That said, use your friendly R to your advantage. The sex is "cake eating" IMO, but being friendly with each other is not.
You need to be able to set boundaries, but do so calmly and without anger. You can remain friendly, but he needs to know, OW is not acceptable. And while that continues, you, physically, are off limits.
BITS
Happiness is not something ready made. It comes from your own actions.