I think it's probably similar to the way recovering alcoholics feel when they are around old drinking buddies. Sometimes we have to distance ourselves or give up relationships if they are not good for us.
If you want to keep the friendship, try using your detachment skills. Try just being a friend without getting sucked into the drama, enabling, etc.