No, it's not. it's an illness. Your quote is about 'character flaw' as a literary critique concept.
I was going to say in my post (the grandparent) that it could be argued, though not technically. Technically, it's not a character flaw.
To be clear, I'm not singling out people with mental illnesses; as a person with a physical illness, I would have considered it to be one of my "character flaws".