I don't think it would cause any more problems than it could in a 'vanilla' relationship, or in other aspects of ones life. I think it's our sensitivity to these things, our desire to keep our issues private, that can cause issue. I think the best way to tell a Dom/me is to just be upfront and honest about it. If you think it's something they need to know, then it probably is. Depending on what mental illness, without the knowledge, a Dom/me could potential cause harm or unknowingly exacerbate the problem.
I've struggled with depression and anxiety, and I have seen a few different therapists, though I refused their suggestion of medication. Every so often an issue will crop up, and it is something I want anyone I'm with to know about if it becomes an issue, but I usually only talk about when I feel it's appropriate for them to know. My current boyfriend is aware of any issues I've had.
I will echo what everyone else has said about communication. It's just as important for Dom/mes to be upfront and honest about any issues they have. It's never fun to find out down the road that someone has been hiding something from you.