Many people with mental issues also have gaps in their CVs. Some are small, 2-3 months, and not a big deal, you could be changing job, waiting for a course to start, helping out a relative, whatever.
But what about your bigger gaps? Those that are 2+ years? You don't want to leave it empty, or let people think that you were in prison, but you also don't want to put there mental issues. Even if you are realistic about having mental issues, sometimes it's not wise to confess it.
So, what do you put on your CV if you have a gap of >2 years???