Relationship with people with mental illness

I have a question, how much of you guys are in a relationship with someone who depressed or with anxiety or mental illness in general? I was wondering how you guys handle being in a relationship with someone that could shut down any moment or just ignore you when there's a problem going on in life.