I don’t have an easy answer to your question, but I think you need to find something closer to ‘you’ to hang your self-worth on. Allowing other people to determine how you feel about yourself never seems like a good way to go.
If she asks you for help again, I’d say something like, “why, so you can take the credit for it after telling me you wouldn’t like the last time?”