The hot and cold cycle of attention followed by neglect, or kindness followed by malice, will create a trauma bond. Your brain will oscillate between pumping out oxytocin (the bonding hormone) and cortisol (stress hormone).
The intensity and instability of this chemical cocktail breed a hurricane inside your skull and heart. You feel unsafe. A simmering, background anxiety floods your state, undermining your well-being. It becomes difficult to sleep or focus.
Brain chemistry plays a massive role here. To stay sane through this process, you need to understand the brain's prime motivation and mechanics. Your brain's main goal is to keep you safe, not happy. Happiness becomes attainable only after your brain is convinced that you are safe.