Any time you take on a client, you must consider whether the client is capable of giving you instructions and continue to evaluate that issue throughout your relationship with the client. Remember that just because someone suffers from a mental illness, for example, does not mean they are not capable of instructing counsel.
The general principle is that you cannot take on a new client who lacks the capacity to give you instructions unless you were appointed by a court or tribunal, by the operation of a statute, or in a proceeding in which some aspect of the client's mental capacity is in issue. You may, however, take on a client of marginal capacity if he or she is competent to give you instructions on some, but not all, matters. See the commentary to rule 3.2-9 of the Code of Conduct.
The rules are different if you are dealing with an existing client. You must maintain a normal lawyer-client relationship (to the extent reasonably possible) with a client whose ability to make decisions is impaired (see the Code of Conduct, rule 3.2-9).
In addition to ensuring that all communications with a client who is suffering from mental illness are well documented, make certain that your staff members are equipped to deal with the client. Take a flexible approach as each client will have particular needs. Also, remember that you are a lawyer, and are neither equipped nor licensed to provide counselling for mental illness. Familiarize yourself with the resources that are available for persons with mental illness in your community. Also, familiarize yourself with the rules regarding client capacity in rule 3.2-9 and its commentaries. In certain circumstances you may have particular duties of confidentiality to a client who lacks capacity (rules 3.2-9 and 3.3-1, and paragraph  of commentary 3.3-1).