I've written a lot about mental illnesses and such, but never addressed how to correctly handle them.
@SirenDep here you go.
Never say you're "dealing" with them.
If it's to their face or not, you're not "dealing" with them. They aren't a problem, they're human. They're dealing with an illness of the mind, you're handling someone who's not 100% well.
Try to help them feel better.
This may not always work but keep in mind, it always helps. If they're depressed, let them know they're not alone, try to make them laigh. If they have anxiety, try to reassure them of their worries or try to calm them down after a panic attack. If they have OCD, help them with whatever process they need to go through if you can.
Making them feel better isn't always an option, but just being nice to them, is.
Tolerate their actions.
If they behave badly (say due to depression, they snap at you) don't let them get away with it, but be nice. Even if you're mad, don't show it, or at least be nice at the way you express your anger. They have to know you won't take any shit from them but that you won't stop being their friend because they made a mistake.
Encourage them to improve their behavior.
Do this in a very gentle and loving way, especially if face to face. You don't need to walk on egg-shells around them (depending on the person), but just be nice. If you're afraid something you say will trigger them, try to re-word yourself or explain thoroughly.
Talk about it with them.
Don't let them think that it's a taboo subject unless they specifically mention they're not comfortable talking about it. Talking about it allows understanding between the two of you, and a better grasp of the illness.
Don't alienate them.
They're just like you and I, they're people who need/want people to care for them.They wanna be genuinely cared for, not out of pity. Don't alienate them and make yourself their only friend, and don't ignore them-even if they're annoying you. Just nicely tell them you'd like some time alone.
Try to understand it.
Even if you can't, just try to. They'll appreciate the effort and it may help you understand what it's like to have the illness or what exactly it consists of.
If you find out after becoming friends, don't treat them differently.
If you've been friends a while or just become friends and they confide in you "I have a mental illness," don't let it affect the way you think of them. They're the same person they were before, you just now have new knowledge about them. (Just like if a friend comes out as LGBT or something).
If someone has anxiety, reassure them. Text them that you got home safely, let them know everything's okay etc. If someone has depression, make sure you let them know you're there for them. For OCD, (that one's kinda difficult), I suggest just to help them finish whatever process they need to.
For other illnesses it's more difficult, but all in all, be nice to them. They're human too.
Telling someone with a mental illness to snap out of it, is like telling someone who's deaf to listen harder.