If the only significant thing in your life is your job, then your identity will be inextricably tied to your work. So criticism of your work will be an attack on your identity.
Become a well rounded person and your ego will naturally shift its locus.