Maybe your wondering of Bipolar is correct... BUT the Person could also have BPD. Borderline Personality Disorder. It has four different types and there is a push/pull to escape real or perceived abandonment. One minute? They want to pull you close and they adore you. Then something trips that trigger and they want to push you away, devalue you and say harsh things. There's a book called "I hate you, Don't leave me" that explains BPD in depth by two mental health professionals.
It's one of my six mental illnesses and I show symptoms of all four types. Minus the manipulation of the petulant type, but double the lack of impulse control and risky behaviours of the self destructive type.
It's caused by trauma in childhood-- usually abusive environments and such, and because it can be misdiagnosed that young, they usually wait until young adulthood before diagnosing it.