To my premature understanding of the cited teachings, the resentment could be toward others, and could also be toward oneself.
I don’t think it is clear in the Suttas whether or not
arati / anabhirati may be directed toward oneself. The Abhidhamma commentaries, however, conceive it as something that is wholly other-directed. Resentment is stated to be the function (
rasa) of the mental factor of envy (
issā cetasika). Obviously it is psychologically impossible to be envious of yourself. That is to say, you can’t be enjoying some success or happiness and yet simultaneously resent your possession of it.
An unattractive woman, for example, may resent a beautiful woman’s possession of beauty, but a beautiful woman would not ordinarily resent her own possession of beauty. Where she
does resent it, it will either be because she fails to perceive it (as in the case of an anorexic woman with a delusional perception of her bodily dimensions) or because of some unwished for consequences deriving from it (perhaps it leads to her being constantly harrassed by unwelcome suitors). In these cases, however, the resentment is directed towards something that the woman perceives to be a flaw or drawback (
vipatti) rather than an asset (
sampatti). Resentment of a flaw (or of what one perceives to be a flaw) would consist in the mental factor of aversion (
dosa), not the mental factor of envy (
issā).
If we want to practice the cure for resentment and discontent (MN 62) for Samadhi, then we might include the appreciation for our own goodness and success as well -- or is there another term/teaching for the appreciative joy towards oneself?
As you may have seen from the Vibhaṅga quote posted by Dmytro,
muditā even in the Canon is conceived as other-directed. The commentaries make it clearer why this is so. The range of potential
ārammaṇas for any beautiful mental factor is co-extensive with the range of potential
ārammaṇas for the unwholesome state that it opposes and displaces. So, whomsoever may be the object of one’s envy may also be the object of one’s sympathetic joy. But as we have seen, one cannot be the object of one’s own envy. From this it follows that one cannot be the object of one’s own
muditā.
This is not to say that joy doesn’t arise on account of one’s own
sampattis, but merely that ‘joy’ in this case would be a term for something other than
muditā. Whereas
muditā is always reckoned as wholesome (except when occurring in the kiriyācittas of an arahant, when it is merely functional), the joy that arise in connection with one’s own
sampattis may be wholesome or unwholesome. If, for example, you win the lottery and joy arises as you dream of all the ways you’ll now be able to indulge yourself, then this would be unwholesome
pīti and
sukha. But if joy arises as you contemplate all the gifts that you now plan to give people, then it would be wholesome
pīti and
sukha. In neither case would the joy be termed
muditā.