To realistically write a character with mental illness, you must understand that said condition is a core element of who they are and not just an add-on. It affects how you think, perceive, feel and decide every day, every waking minute. To this end it's advisable to do a lot of research to make a believable character, as well as try to keep the number of conditions low as one by itself is often already crippling. For example, a person with ADHD lacks the focus to write a long, coherent response. A character with PTSD is going to be banned from any kind of combat scenario, etc. That's stuff you have to think about when you're writing your character. The more you pile up, the less likely a functional, or even breathing individual comes out of it for you to RP with.