The law also prohibits use of electro-convulsive therapy, referred to as shock therapy, without the use of muscle relaxants and anaesthesia on a patient suffering from mental illness.
Besides this, such patients cannot be chained in any manner as per the Mental Health Care Act, 2017 that got nod from the President on Friday.
The law aims to provide mental healthcare and services to persons with mental illness and to protect their rights.
"Notwithstanding anything contained in section 309 of the Indian Penal Code (IPC) any person who attempts to commit suicide shall be presumed, unless proved otherwise, to have severe stress and shall not be tried and punished under the said Code," it reads.
The IPC section lays down punishment, simple imprisonment for a term which may extend to one year (with or without fine), for whoever attempts to commit suicide.
The appropriate government (the Centre or state) shall have a duty to provide care, treatment and rehabilitation to a person, having severe stress and who attempted to commit suicide, to reduce the risk of recurrence of attempt to commit suicide, the Act says.
The new law bars use of electro-convulsive therapy without the use of muscle relaxants and anaesthesia; electro-convulsive therapy for minors, and sterilisation of men or women, when such sterilisation is intended as a treatment for mental illness.
It also says that the person with mental illness shall not be "chained in any manner or form whatsoever".
The law provides provision for medical insurance for the treatment of mental illness.
"Every insurer shall make provision for medical insurance for treatment of mental illness on the same basis as is available for treatment of physical illness," the Act says.
The new law, which repeals the Mental Health Act, 1987, has been enacted to align and harmonise existing laws with a United Nations Convention on Rights of Persons with Disabilities and its Optional Protocol. India has signed and ratified the Convention.
Psychiatrists have welcomed most of the provisions of the new law.
"The new mental healthcare act decriminalises attempt to suicide by a mentally ill person besides prohibiting doctors from using shock therapy. This is a welcome step and will go a long way in providing medical healthcare to people with mental illnesses," said Satyakant Trivedi, Consultant Psychiatrist.