As you say, OP, this is a perennial DL topic and I first posted this story about 15 years ago, so apologies to Marilu Henner and anyone else with her super memory.
I met my BPD friend at work, and in many ways she was one of the best friends I've ever had. She was that type of friend that knew when to give a shoulder to cry on and when to kick me in the ass when needed. She was also one of the funniest people I've ever known. I have so many memories of her making me laugh so hard I'd literally fall out of my chair. We had a lot of fun, and we shared more than a few tears. But it didn't take me long to notice how "off", like OP's friend, her behavior could be. If she was having a conflict with someone in her life, or at work, she could rant hysterically about it for days and weeks on end. But when she was getting along with everyone, and things were going smoothly for her, she lost all affect and energy, as if someone pulled her batteries out. Her opinions about people could flip-flop so drastically it made my head spin. She had one relative that she used to complain about so vehemently you'd think they were Satan incarnate, and after years of this vitriol one day she told me that same person was her favorite member of the family and she cherished their close relationship.
Inevitably, it became my turn in the barrel, and she cut me off dead after some slight I committed that I honestly can't remember. I received a long letter detailing my character flaws and all the ways I'd hurt her. I thought that was the end of the friendship, but when I was going through a really hard time about a year later, she swooped in and stood by my side just like nothing had ever happened. While I was happy to have her back, especially in my hour of need, I tried to gently address our estrangement once or twice, but she acted like she didn't know what I was talking about. We were peas and carrots for several years after that, until she stirred up some trouble between a co-worker and me and I called her out on it (not angrily, just irritated) and boom! I received another letter and another 18 months of silence. Eventually, she started popping by my desk to say hi and gossip about work nonsense, but I kept it casual for another year or so. She kept scratching at my door, though, and I finally relented but insisted we address her habit of ending our friendship randomly. She halfheartedly participated, but really couldn't articulate why she did it. We put it behind us but I was very clear that if she ever did it again, it would be for the last time.
She left for another job, but we remained close for several more years. Inevitably, I got on her wrong side once more. We had plans for lunch and shopping one Saturday, and after a hard week at work I slept past our agreed meeting time. I apologized and offered to meet her later that day, but she was too furious to consider it. A couple of days later I called her and she tearfully told me how selfish I was and how could I let her down when I knew all she'd been through. I reminded her of my statement that the next estrangement would be the last, and she hung up. That was the last time we spoke.
About six or seven years later, I heard from a co-worker that my friend had died. It was a shock, but not surprising, if that makes any sense. Though only in her mid forties, she was extremely obese and always suffering from one illness or another. I had mourned her long ago, but I still couldn't help but feel sad about all the years she wasted being unhappy.
You didn't ask for advice, OP, but I'm going to give some anyway. End this friendship as soon as you can, as gently as you can. Though my friend was good to me and we had lots of fun, the amount of time and emotional energy I wasted on her outweighs the good times exponentially. Good luck.