Where does our sense of self come from? I believe that originally, it comes in part from the thousands of explicit and implicit messages we received every day from our environment about ourselves; that we are good or bad, smart, strong, pretty, handsome, skilled, successful--or not. This environmental feedback creates a story or narrative that to a large degree constructs an identity. Some people have a stronger sense of self that they develop and are in touch with regardless of, or despite this narrative. But this combination of nature and nurture variables gets internalized as the story of who we are, especially during critical, formative periods and experiences. Sometimes that story is a positive, accurate reflection of who we inherently are, and sometimes it is a distortion, due in large part to the dynamics of the primary nurturers. For where there is a narrative, there is a narrator, and so we must understand what was going on for the story-tellers in order to more fully understand the story.
Here is one stark example: I once worked with someone who was born one week after his brother tragically died in a pool accident. Clearly that family, and especially that mother, was in no place emotionally to receive, love, and nurture this new child. That fluke of circumstance to some degree forever defined this person's sense of self as being unreceived, unwelcome, an intruder, and an outsider in the world. We have to factor in our family and parent dynamics, our parents' personalities and mood states, when we seek to understand the environment and context for our own identity development.
By understanding what happened (cognitive process), and if necessary processing our feelings about what happened (affective process), we can begin to change it. We can question or challenge long-held assumptions or beliefs we might hold about ourselves: Am I really an introvert/extrovert? socially anxious? a poor athlete? unable to learn to speak publicly? to be a manager? to work with people/numbers/technology, etc.? Am I really a bad writer? unattractive? not good enough (in all the many ways we can feel not good enough)??
In essence, we can de-construct the old narrative, and tell a new story about ourselves. We can repair through re-parenting ourselves, in some ways creating and providing for ourselves some aspect of what we needed but did not receive (e.g., love, positive reinforcement and mirroring, emotional safety). I believe it is almost never too late to ask these questions, and do this kind of work creating a new sense of ourselves.