How is it possible to give someone something, or to do something for their benefit, and still feel like you were the recipient?

I call that grace. Grace is neither an obligation, nor a favor. Grace is freely given, and is like money that doubles in quantity when shared. Magically, the giver keeps the new half.

A favor benefits the recipient but not necessarily (and often not at all) the doer. Though a favor can be done without the doer counting it, if, in the future, a proportional favor can be done in reverse, that doer would expect to be given that.

Grace is truly the stuff of friendship. Though a favor can be an honest good deed, like donating a substantial amount of money to a hospital on the condition it’s named after yourself (indeed the patients, nurses and doctors will benefit), grace is not boastful (and here I don’t try to denigrate the person in the example I just gave).

Importantly, grace is not self-righteous either. One is not even boastful about doing something good anonymously, as an act of attestation of one’s own benevolence. Simply, the giver genuinely feels like a beneficiary.

Grace is like an amateur cook attempting a new dish, achieving an outstanding result, and fully realizing that it was not their skill alone that accomplished it. One can be happy and grateful, but not honestly boastful.