Words ending in -self or -selves are called reflexive or intensive pronouns. They should always refer to another word that has already been named. In grammatical terms, they need an antecedent.
Incorrect: The president named myself to the committee.
(Myself is not previously named)Correct: The president named me to the committee.
Correct: I did it all by myself.
(Myself refers to I)Correct: John talks to himself when he is nervous.
(Himself refers to John)