Give them no more of you. No more good advice, no more confidences, no more funny stories, no more of your heart. No more explanations of how you are just trying to UNDERSTAND (that's what I do) and EXPLAIN that my motives are good.
I have learned to reserve those things for people who are good to me, and I won't act ugly, but I won't try to be friends with people who don't like me.
That's where I am learning to draw my line.