Mental illness is one of those grey areas in society. Obviously it's not acceptable for people to people to treat you disgustingly, but when someone is mentally ill it's hard to hold them responsible for their actions.
Personally, I think it's a case by case basis. I have a good friend with OCD and some major anxiety issues, so if she is randomly really bitchy to me once in a while because she is under a lot of pressure, I'll just let it go. However, I won't let her treat me badly.
On the other hand, if I was friends with someone who was schizophrenic or bipolar or something serious like that, it would be harder to hold them responsible for their actions.
At the end of the day, I DO NOT want to be surrounded by anyone who treats me like crap. Mental illness or not, I cannot maintain a friendship like that. It might seem mean, but that's the truth for me!
You need to decide whether you can forgive this person and you want to help them out, or if they are just too toxic for you to deal with.