Identity is at the confluence of intrinsic and extrinsic representations.
The first are proposed by the unconscious. They include different affluences, sensory, corporeal, biographical. Schematically it is the most programmed part of the identity. Habits, reflexes, mental tattoos, anchorages, give them multiple names, these representations are not fixed but less dynamic than the conscious contents, for there must be a stability to the mental structure. Imagine our fragility if consciousness could change everything at leisure, without really grasping all the consequences!
Extrinsic representations are inherited from the environment. Learning, mimicry, hopes, ideals, moral rules, oeuvre, all this is less created than borrowed from our socio-cultural environment, and reworked by interaction with intrinsic representations.
Thus you can easily distinguish two images of the self, the experienced (intrinsic) and the expected (from the extrinsic representations). Impossible to hate or admire oneself alone. It takes a dualism of these images, which allows a self-observation.
The resulting identity is a conflict. Productive, or sterile. Often alternating between the two. The extrinsic representations arrive in waves, through the encounters, the readings, the slowly digested events. These waves sculpt the cliff of intrinsic identity, giving it at best an original and harmonious form, but sometimes collapsing it, or beating in vain against an unalterable granite.
Neurologically, since you speak of the brain, it is impossible by present means to find a concordance between the psychic function and the neural excitation function, for a simple reason: the whole brain is busy representing. There is no anatomical localization for most of what constitutes intrinsic or extrinsic representation, except for the simplest. Body representations are the easiest to follow since they start from specific visceral sensory affluences. But visual and auditory information is intended both for intrinsic reflexes and for languages, which interpret them in extrinsic concepts. The data are entangled into the mental organization pyramid. It is only at the approach of the summit that the higher concepts end up integrating completely into the conscious « I ». These superior concepts are what I call the persona, the most sophisticated patterns of our personality, capable of acting for a specific reason, and sometimes, very quickly, giving way to another pattern with different motives, without that we have the impression of suffering from a syndrome of multiple personality (this conscious fusion of the persona works very badly in the schizophrenic).
Here is the identity seen through two paradigms, psychic and neurological. There are others, social, cultural, genetic, evolutionary. Unable to make room for everyone in this short answer. However, they are other swells that all converge towards the same confrontation, smooth or blazing: the encounter of external and internal fluxes in the maelstrom identity.