Here we will see Section 309 IPC | Indian Penal Code.
Attempt to commit suicide.— Whoever attempts to commit suicide and does any act towards the commission of such offence, shall be punished with simple imprisonment for a term which may extend to one year or with fine, or with both.