Hi, I'd like to help you with your question.
It sounds like you may have been taught, maybe in childhood, that being kind to people who hurt you is ok. It is common for children abused or mistreated to develop a feeling that they must be there for others no matter how they are treated. Most likely, this is about a self esteem issue.
Whenever we expose ourselves to others who continually hurt us, it is a way of saying it is ok to make us feel bad. That usually means that we do not feel we have the right to stand up and say "I will not allow you to hurt me". It also goes back to not wanting anyone to think poorly of us, much like we think of ourselves.
The best way to address this problem is to work on improving your self esteem. One way is to work with a therapist. A therapist can help you pinpoint where your feelings came from and help you address your self esteem. To find a therapist, ask your doctor for a referral. Or you can search on line at http://therapists.psychologytoday.com/rms/.
You can also work on this at home. There are numerous resources you can use to help you. Here are some to get you started:
Self-Esteem: A Proven Program of Cognitive Techniques for Assessing, Improving, and Maintaining Your Self-Esteem by Matthew McKay and Patrick Fanning
The Self-Esteem Workbook by Glenn R. Schiraldi
Healing Your Emotional Self: A Powerful Program to Help You Raise Your Self-Esteem, Quiet Your Inner Critic, and Overcome Your Shame by Beverly Engel
You can find these books on Amazon.com or your local library may have them for you.
Let me know if I can help any further,