Either the protagonist has self doubt about their identity, what they are or should be, or they're presented with compelling or undeniable evidence that they truly are not what they thought themselves to be.
The first video game about Identity crisis was released on December 21, 1998.
Unlike amnesia, the protagonist has no memory loss, or does not perceive themselves as having such.
This also includes cases when the identity crisis is a major plot point/theme not related to the protagonist (e.g. their companion or other major character in the plot).