Answer:
I always pay for dinner despite earning less money than he does. I think he resents me for this.
Step-by-step explanation:
Based on the sentences in the question, it can be taken that the first sentence makes much more better sense with it's pronoun reference than the other sentence. It may well be taken that "my generosity' can also be a good and correct way of writing the sentence but, considering the form of the sentence and the flow of it, the first option makes more better sentence.
Thus, the sentence with the use of "this" will be a more correct way of writing the sentence with a correct pronoun reference than with the use of "my generosity". So, the answer to the question is
I always pay for dinner despite earning less money than he does. I think he resents me for this.