My recommendation would be: don't make your work be part of your identity, unless it's your work (e.g. your business). The work you do for others is not who you are. Your employer is not your family, nor even your friend. It's a business relationship, and should be taken as such.
This, incidentally is good advice for both sides of an employment relationship: employers sometimes also mistakenly believe that employees are their friends and family and then get a rude awakening when employees suddenly leave with no warning, for a 10% increase in salary.
I agree with the “it’s a business relationship and not family” part, but not with the identity part. Something you spend ~40% of your awake time with is certainly part of one’s identity, and for good mental health should be something one enjoys.
This, incidentally is good advice for both sides of an employment relationship: employers sometimes also mistakenly believe that employees are their friends and family and then get a rude awakening when employees suddenly leave with no warning, for a 10% increase in salary.