Mistreat
her, never appreciate, equiped with flaws, etc - when you decide to
change for the better, she had already lost the reason and will to
continue this relationship. You only realise it when you are on the
verge of losing her and ultimately you did, because if you learn
this earlier, this wouldn't have happen isn't it?
Like rubber band, it snapped after you pulled more than what it
could bear.
You promise her you will change? But unfortunately, she wouldn't be
around to witness that. So how brown cow? Sink and depress yourself
further and continue your original lifestyle, behavior and
attitude?
If that were to happen, let me reassure you that history will
repeat itself again. Under Love Cosmic law - every
relationship we have, has their own reason of existence.
She came into your life to make you realise the beauty of upholding
the duty of a decent bf. Will you humble yourself and accept this
learning cycle or degenerate and run away? 
P.S: Take this time to explore your mind and emotions. There are
tons of work to do: to improve one self beyond imagination. You
don't even have to look for another girl if you perform what I
asked of you because love is about learning and once you completed
level one - level two will begin when you are ready for them. If
not, you will never attain wisdom, guidance and enlightenment in
love and wouid constantly stroll in circles.
Cheers