One can so ardently desire to be engaged in holy actions, that the satisfaction of experiencing it becomes more important than the action.
One cannot help getting some benefit from all the holiness one is dispensing, but, as Rabbi Akiva is reported to have said, it is perhaps better to wait until the recipient of one's charity resents you and heaps curses on you before feeling your own worth in the matter.
The moral here is obviously not that there is a seemingly masochistic ingredient in the process of doing good.
Rather it is that one should recognize the perils involved in sanctity.
One may sincerely wish to do something very grand in the realm of the holy and at the same time to feel something of the grandeur of what one is doing.
In this case, one is doing it for oneself, a sign that its origin is in the shell, for the klipah is always egocentric.
The shell in fact can be defined as that which is constructed as a private world around the ego.
–Rabbi Adin Steinsaltz
From "Elixir of Life and Death," p. 205, in In the Beginning by Rabbi Adin Steinsaltz