Negative person

I recently took some distance with a friend of mine because I judged her to be “too negative”. Always grumpy, seeing glass half empty all the time.
I knew that it was probably a mirror of what I actually think of my self. I didn’t mean to tell her knowing that, but she asked me why I wasn’t talking to her as much, and I wanted to be honest.
I think it was unfair from me, but I also think she’s not a good influence on me.
Should I stick with the relationship as a way to recognize my own negativity ? Or is it okay to want more positive people around ourself and so, break up with some negative relationship?