On the surface, it may seem as if he’s only coping with the loss of a past lover, but it also details how he’s masturbating. He simulates the “real thing” as he has achieved the correct speed (tempo) in which he pleasures himself. Moreover, he knows how to satisfy himself by feeling whatever “it” is without his assumed ex-lover.
The relationship is no more, memories are associated with the painful breakup, so he endures this pain by touching himself.
His notion of loving himself is reiterated several times in the chorus and echoes his message that he will put himself first in life, ignoring past relationships.
He represents a person who has self-value and strong independence, so he doesn’t need the recognition of others.