"I have done so much for her and see what I get in return."
Sometime or the other, all of us are prone to feeling this way. It becomes worse when this feeling creeps in between two people everytime they have the slightest of the arguments. The next stage is more often than not 'regret'.
Feeling cheated in this way does not make you a bad person. It only makes you human. But if you hold these thoughts somewhere within you, they are sure to surface some time in form of words or actions. And this can deeply hurt your friend/spouse/parents/children/siblings...
I started thinking about this when someone told me that it is difficult to avoid this frame of mind. I agree to a certain extent. In extreme cases, it is often important for you to know for yourself that you have done the best for something. For example, in case of a cheating spouse, if you know that you haven't left any stones unturned to make the marriage work, you are more confident of your choices and you get the courage to face the world, including the errant spouse.
The next question that automatically comes to mind is what is the difference between "I have done everything I could to keep this going so what has gone wrong." and "I have done so much for him so why is he doing this to me." If you haven't realized already, let me explain. The difference lies in the fact that in the first case, you are not doing anything for somebody else. If you have tried to make the marriage work, it is not for someone else. At the end, it is always for yourself. You can argue that you did it for your children so that they don't have to suffer a broken home, or for your parents so that they don't have to face the society. But at the end it is only because of the fact that you will not be able to face yourself if you harm your children or parents in some way through your actionsor the lack of it.
If you wish to refute, give me an example of a single action performed by anyone you know that wasn't for self gratification. Biggest charities are done so that the one feels satisfied that one is giving back to the society in some way. Or simply for the fact that it makes one feel like a better human being. One even takes care of one's parents to prevent a feeling of guilt.
So, coming back to the first point, the best way to stop feeling that you have done a lot for someone is to realize that every single action that you perform is for your better self image and, therefore, for yourself. Once you imbibe this truth, you will slowly stop feeling like a martyr in all tussles with your loved ones and you won't accidently hurt those whom you hold dear.
The best way to be selfless is to realize that all of us are selfish to the core and that being selfish is not so bad. Selfishness helps your conscience keep you on track.