During the latter part of my r/s with a person with BPD, her having moved out of my apartment and us seeing each other maybe once a week (despite living as neighbors almost), in hindsight I recognize that sex had become the last remaining source for oxytocin, one of the most important bonding hormones.
Everything else was lathered with dopamine. She was always alert, always ready to complain and rant. Me too actually. I was always nervous meeting her. It was almost tangible, the energy between us. All spark and very little actual fuel to burn and what little fuel was there was always burnt out in a huff. Like warming yourself by lighting firecrackers. The only way I would feel comfortable with her was if we found a topic to rant about together. That seemingly would diffuse the tension though it would also come back in a heartbeat.
The whole r/s was this flurry of triangulation, positive or negative! We needed a third object to loathe or love in unison. Even when we expressed love to each other, it was more about me loving "at" her and her loving "at" me. Not triangulation in that sense but a weird set of separate one-way streets, the cars never meeting, you know? No true bonding.
When things went okay, we had sex. When things were excellent, we had a lot of sex. One day after such a day of... plentiful bonding I masturbated about 15 times at home. I'm not exaggerating. It felt like rediscovering sex, both solo and not

. I was only vaguely aware that this is not good.
We even started the countdown to the final breakup by me getting super angry at her for slinking out of my apartment when we were supposed to have sex and she got into an episode when I said something that upset her. That was the recipe for the last months of us being together: me upsetting her, her leaving in a more or less mute state.
I think this sexual dynamic really messes up with my brain and is making letting go that much more difficult. In my head it feels like that it's okay to have a terrible relationship as long as you can have sex every once in a while to reconnect. The actual person fades from the picture and it becomes transactional.