I really think it depends on the player's intention when they choose to roleplay a given character. For example, I've seen characters who list "a stutter" under a series of personal quirks, where the intention of the player was to make that stutter help the character seem more endearing or immature or amusing. I've also seen characters who list the same kind of stutter, however the purpose it served was the opposite—it highlighted real social ineptitude and personal aversions to public speaking and attention, due to whatever kind of backstory that character had (troubled childhood, trauma, etc). The way I interpreted that quirk for that character wasn't a static thing based on how I preferred to look at it; it was influenced by the rest of the character.
If you want to give your character some kind of illness, be it physical or mental, I think you need to approach it like you would any other trait. Give it context, keep it in line with the tone of your character, and present it realistically.
That said, mental illnesses are tricky. It's not easy to traverse them through a character if you don't already have a solid understanding of them and their effects on a person. They need to be done tastefully, or it has the potential of sullying your entire character because you missed the mark, either by going too overboard with it or not giving it the appropriate amount of weight. And that all, obviously, varies depending on the type of mental illness you're going with.
If you want to give your character some kind of illness, be it physical or mental, I think you need to approach it like you would any other trait. Give it context, keep it in line with the tone of your character, and present it realistically.
That said, mental illnesses are tricky. It's not easy to traverse them through a character if you don't already have a solid understanding of them and their effects on a person. They need to be done tastefully, or it has the potential of sullying your entire character because you missed the mark, either by going too overboard with it or not giving it the appropriate amount of weight. And that all, obviously, varies depending on the type of mental illness you're going with.