You are right. There are a lot of mental issues out there and you have to separate yourself from being around these people and it is important for your own mental well being to retain your pride and honor and not let someone treat you like a dog just to maintain a relationship.
But sometimes the best medicine you can put on something like this is your realization you were not the problem but the victim of a problem some people just did not have the resource to control. Realizing the other person had some mental issues and just telling them in a phone call or something you were thinking about them may be the medicine you can to change that person with. Better while they are alive and can hear it.
I recently talked to my X on the phone and she still has some serious problems. She left word to call her back while I was gone. I had word from her kids she was facing a cancer problem and death was around the corner which was not the case. I thought the wanted to say she was sorry. The witch asked me for money . I was not comfortable talking to her at all. I still think I did the right thing.