How do I find a balance ?

Hey girls I need some help. I recently broke up with my boyfriend who has depression and some serious issues to work out. He mistreated me really badly because of his situation and it hurt me to the core because I tried to help him out and he turned on me and treated me badly.

He did some things that made me realise that he didn't care about me the way I cared about him so I'm trying to not care about him either and to let my feelings go away. The problem is I feel stuck. The bible says to pray for those that hurt you and I've been doing that for him especially because of his issues but I'm also trying not to care about him either.

How do I find a balance ?