Dissociative Identity Disorder. Formerly known as Multiple Personality Disorder (along with another disorder that was thrown under that name). I mean it’s not exactly how you describe it for every case of it, but people I have talked to with DID describe really similar experiences.