In UK law, only a person with capacity can give consent. There is no proxy consent. When a person loses capacity due to mental disorder ( for ex delirium) , the doctor can take a decision in the best interest of patient. He takes the wishes of family members as a good practice. If time permits and pt does not agree for a treatment ( for ex surgery) , he should approach court. Usually trusts legal time does all the work plus advice. You can not treat physical illnesses of mentally ill under MHA.Ofcouse Psychiatric treatment is given under Mental health act and no need for court intervention.