Dreaming that you are mentally unstable (such as psychotic or insane) can represent:
A feeling or fear of not being able to think clearly or logically
A feeling or fear of others not accepting you
A feeling of being unable or unwilling to deal with your life right now, as in frustration, overwhelm, or a low tolerance for problems or responsibilities
Someone else being mentally unstable can mean you're attributing these same things to them, or can represent the idea of a situation or person seeming out of control or unpredictable.