In the early '90s there was a trend to something called "ego-less programming". The idea was to leave your ego at the door when coding, and definitely when doing a code review, thereby removing personality - and personality insult or injury - from questions of code quality. As a then-techie who'd attended a review or two, this struck me as a very good idea.
What you describe as "identity" may be better described as "ego". For most of us, the ego so dominates that the two are indistinguishable: Ego is who we are, ego promotes and defends our identity.
Now, without going all new age on you, think of a moment when your ego has been totallly in control (any episode of rage, be it road or code, is likely a good choice). Now think of how, on your better days, you don't consider that person to be you. Of course it wasn't, it was your ego taking control.
Keeping your identity small is one approach, but perhaps a more fulfilling one is to manage your ego. Recognize it as but one of your tools for personal expression and defense and bring it out only when necessary.
Many of us "identify" with a great many things and this makes life rich. Keeping your identity small may be impoverishing.
Consider discussions on religion or politics you've had with people who seem particularly wise or calm. They are probably among the best and most insightful discussions you've had. And I will bet that the wise person has strongly held beliefs, beliefs that are strongly part of their identity. But they manage their ego: They can consider all sides, and even update their position, because they have separated ego - and externally manifested phenomenom - from identity, an internal state.
(I experienced the ego-less programming trend at Bell-Northern Research, aka BNR, then the research arm of Northern Telecom, now Nortel. I don't know whether it was BNR-specific, Telecom-generic or industry wide. Interestingly, only techies and techie management really seemed to get it. Folks in soft disciplines thought having ego bound with code was necessary to take pride in one's work.)