There is no equivalent exemption in relation to ESA, and unfortunately, with the new rules being brought in now, it will be extremely difficult for people with mental illness to get ESA.
However, if you don't get it on the basis of meeting any of the other criteria there is also a clause relating to serious risk of harm to yourself or someone else if you were found fit for work.
We will be publishing our guides to the new criteria shortly. In the meantime, we have published an online test based on the new criteria that you can use.