In all common law countries, this would be the tort of battery (thus, illegal). The police might lawfully lay hands on the person, under certain conditions. First, the police would have to be legally arresting the person; second, the person would have to be (unlawfully) resisting that arrest. If the person acts in a way that a police officer "has reason to believe to be so mentally ill as to be incapable of taking care of himself", he may arrest the person (Mental Health Act 1987 art. 23). Part III (art. 20 ff) provides the legal background for the second path for arrest, via involuntary commitment. Under the circumstances you describe, a court would have to first order the person taken into custody (leading to an arrest, and possibly being subdued). The police would not be authorized to administer a sedative, so they would have to use physical restraint (handcuffs, hammer-lock and so on). The process is either initiated by a psychiatric professional, or by a relative (art. 20), then the court determines whether the person is to be so detained.