Sadly - if your wife truly has borderline personality disorder the prognosis is not good.

If she's bipolar ( a possibility, especially given her sexual acting out) there might be more hope for treatment; but while she's manic, it's not likely you can help her unless she crashes.

Be her friend from a distance - sounds like good advice to me.

Ellie