This tends to be the case, doesn't it? The closer you are to the person in need and the harder you try, the more likely you are to get the full force of ingratitude (if the person you're dealing with is the ungrateful type.)
My grandmother was a pretty unhappy individual for the last 15 years of her life. My dad and one of his sisters lived fairly close to her, while my other aunt lived far away. My aunt who lived close by was the one who put in the most time and effort with my grandmother - and it was the faraway aunt who got the most praise from my grandmother, while nothing my close-by aunt did was really good enough.
This disturbed/depressed teenager I've been trying to support for more than a year reminds me of that too. Thankfully, I've stepped away a lot and she is giving me more space so it's been a lot better in that regard. But it kind of fascinates me how she'll project the full force of her self-loathing and resentment at me when she's feeling that way. And I'll get told how much I've hurt her feelings (walking on eggshells doesn't even begin to describe it), how she resents everything I enjoy in life because she doesn't have all those things and more...etc. I don't actually think I'm even a real person to her, in some ways. I'm a sort of...archetype that she both resents and wants to emulate. It's completely bizarre.
I guess this is a sort of "hurting the ones you love the most" thing? I do understand that the closer you are to someone, the more potential there is for hurting their feelings. But acting like the person who's doing the most for you is never ever ever going to be good enough - that I find harder to understand. I have experienced and witnessed so many situations like that, though.