What term means "to imagine one is someone else"?
This can be described as role-projection. I.e. "imagining oneself in the role of another".
This usage isn't common, but it exists in the psychology literature. E.g.:
Hirschman (1983) and others (d'Astous & Deshenes 2005) posit that certain traits can influence participation in fantasy-related consumption behaviours, including role-projection and escapism (i.e., to get away from one's everyday life) or other activities involving visualization. Specifically, an individual's preference for using imagination, can predict a tendency to engage in a certain types of fantasy, including both role-projection and escapism.
link
Imaginal Responses mainly refer to role projection and escapism.
link
Impersonate:
to assume the character or appearance of; pretend to be; to act or play the part of; (Archaic.) to represent in personal or bodily form; personify.
Less common is
Personate:
to act or portray; to assume the character or appearance of; personify.
Impersonate is often used in a negative sense where deception is involved, but this definition shows that personate can be used the same way in legal terms.
UPDATE
Another word that might come across is immersion. The linked article is somewhat convoluted (which is no surprise given that it is posted under the heading "The Gaming Philosopher"), but the general meaning is here:
Fictional identification with a character (immersion) is helped by mechanics that give total authorship over the character's beliefs, desires, decisions and so forth to one player.
So a person having an immersion experience has total control over the traits of the character they are imagining or pretending to be.
UPDATE 2
I have come across another term that is more about one's state of mind (imagination) rather than ones actions (role-playing).
Escapism
The avoidance of reality by absorption of the mind in entertainment or in an imaginative situation, activity, etc.
Escapism is more a state-of-mind than an action, as it attests to the mental state that may drive one to actually escape their current circumstances. It begins with the visualization of alternative conditions. These conditions might be the environment (a vacation escape usually begins with the visualization of that other place), but one can also turn to an alternative identity.
From this article on the subject, the writer discusses escapism and identity in both positive and (clinically) negative terms. Here is an excerpt:
From a psychology perspective, Baumeister (1991) commented that individuals may be trying to escape their current ideas of “self”. He also suggested that escape may be temporarily achieved by “shrinking” down the self to its bare minimum. … The feeling of flow experience has been described as an enjoyable and focused concentration in which one experiences a loss of self-consciousness (Csikszentmihalyi, 1990). Hence, being in flow means temporarily escaping one’s ideas of self. From a psychology perspective, Baumeister (1991) commented that individuals may be trying to escape their current ideas of “self”. He also suggested that escape may be temporarily achieved by “shrinking” down the self to its bare minimum. … being in flow means temporarily escaping one’s ideas of self.
It’s not a great leap to say that imagining that one is someone else is a form of escapism. This would be the case whether it's as a short-term entertaining diversion or as a short- or long-term means to avoid reality in one's personal life.
Since escapism covers more than imagining about one's identity, I suggest a phrase such as identity escapism might meet your needs.
I don't see why Roleplay isn't considered valid here...but if you are looking for another term...
"Acting" or "to act" describes how one can pretend to be another person, and does not necessarily have to mean in media or otherwise.
The word "avatar" describes such a person that one uses to act as another or as a representation of themselves, but doesn't act as a verb.
"Impersonate" can be used if you are acting like a specific person, though not if they are an imaginary person such as a made-up superhero, or if you are acting through them like in a video game.
If you're looking for another hyphenated term, "to act something out" describes the way in which one portrays a certain personality, activity, or other imagined thing.
Hopefully one of these are what you are looking for.
I would suggest "to take on the part/role of" as in:
The boy retreated into his own imagination taking on the part of [super-hero] ..
In most games, the player takes on the part of the main character "becoming" the lead in the adventure.
"Taking on" may also imply responsibility:
He was forced to take on the role as Jimmy's father, since the [tragic event]..
EDIT: I also want to add "to fill someone's shoes" which has an impersonating/burden-bearing connotation to it(but it might not be what you're looking for).
EDIT:(2) "Stepping into someone's shoes" is probably better, as it sounds temporary.