Agree with the above ^^^. A friend of mine tried to trudge through undergrad despite the fact that he felt unstable. He wound up dropping out halfway through one quarter because it became too much for him. Turns out he had become depressed and developed a mild case of anxiety that required medication, and wasn't able to come back till the next quarter. Had he addressed it before it overwhelmed him, he probably could have avoided having that on his record. Keep in mind, that was during undergrad and not medical school. I can only imagine how difficult it would have been for him if it was medical school. Please don't take mental illnesses lightly, it can be dangerous if not properly treated.
If you are asking this question for yourself, it is probably best you bring this up to a therapist. They have been trained to give you the help that you need, whereas most of us sdners are merely premeds and med students.