There is a rather delightful aphorism from the yogic traditions, which will paraphrase, and perhaps mangle a bit:
I have feelings, but I am not my feelings. I have thoughts, but I am not my thoughts.
This pearl of exceptional wisdom should probably be on a plaque on the wall of every therapist and psychiatrist in the world. For this is, in essence, the purpose of many forms of psychotherapy. In cognitive models one learns to identify negative thoughts as not intrinsic to the person. In psychodynamic models, one learns that we are distinct from the patterns we unconsciously repeat in life. In family therapy on learns that one is affected by and affects the family system but is not identical to it.
Gaining this ability to observe without fully identifying is core to adult maturation.