Really I think that if you're going to make a character with mental illness, you need to follow two simple rules: 1) try to be accurate if you're going to label it with a specific term, and 2) don't be an attention whore.
One of my more notable characters that I've had for a long time, tweaked and recycled a couple times is a sociopath. He's incapable of empathy or caring for other individuals. And... that's really all that I've given him in terms of that attribute. I don't think I've ever even technically referred to him as a "sociopath" in the RP, now that I think about it. He just comes off to others as really cold, sadistic and somewhat of a troll - not that he's like that because he's a sociopath, though, those are just other parts of his personality. He also has... I dunno, I guess you would call it a "God complex"? Basically he considers himself a god and is always trying to assume complete control of everything around him - which makes sense considering that, in most incarnations of his character, he usually has an admittedly ridiculous powerset and a whole world he's created, thus putting him only a stone's throw away from being a god. Though in other incarnations where he's less powerful, I guess it falls under the category of delusional. Also, in his latest incarnation, I've given him some early signs of alzheimer's. Every once in a while he has these episodes of memory failure, but, again, I don't think I've ever used the term in the RP. And to the other RPers, he probably just looks like a forgetful person.
Another notable example is a character I made for an RP that fell apart almost immediately after it started, so I never got much of a chance to play her, but I had a lot of fun designing her. Basically the RP had a sort of virtual reality-type setting, and my character was basically supposed to be a glitch in the system. As a result, she had a lot of "mental problems", but I never really labeled any of her quirks with the names of actual mental disorders. Some of them were inspired by real mental disorders, and a few other qualities of hers were just things that I thought would be fun to play. Her awkward social interactions were inspired by autism/aspergers, her emotional instability was inspired by bipolar disorder, etc, but I knew that I wasn't portraying any of these things perfectly accurately - in fact in some cases I intentionally let her traits differ from what I knew the actual disorder(s) looked like. But that was ok, because nothing she had was labeled with the name of a real disorder. They were all just generically lumped under the term "mental disorders", which I explained through the fact that her virtual brain just wasn't wired the right way. And I think that's a good way to get around portraying mental disorders inaccurately, intentionally or not - just don't label it as such. With RP's, you have lots of reasons to justify portraying a mental disorder that doesn't actually exist. And so long as you don't name it as something that you were inspired by or that you think it sort of looks like, then it shouldn't be offensive to anyone. Or, at least, that's my take on it.
Also, I agree that characters with mental disorders can be really fun to play. They let you experiment with a lot of social interactions and characters' thoughts that you wouldn't otherwise get the chance to play through.

That's not why I thought it was funny, though.
