> Are police allowed to do things they would not have normally been able
> to do if not for the situation (e.g. tackling the attempter to prevent
> him from falling)?

Yes.

> If so, how are they allowed to prevent a legal action?

This is a matter of state law and varies from state to state and the exact source of the authority varies. Generally speaking, this authority is provided either by statute or by common law case precedents in each state. But the law on this matter is similar in every U.S. state. Sometimes this authority is provided in the general provisions of the criminal code. Sometimes this authority is provided in a criminal procedure or law enforcement professional codes. And, sometimes this authority is provided in provisions pertaining to mental health proceedings.

For example, in Colorado, Section [18-1-703(1)(d)][1] of the Colorado Revised Statutes states:

> (1) The use of physical force upon another person that would otherwise
> constitute an offense is justifiable and not criminal under any of the
> following circumstances:
> 
> (d) A person acting under a reasonable belief that another person is
> about to commit suicide or to inflict serious bodily injury upon
> himself may use reasonable and appropriate physical force upon that
> person to the extent that it is reasonably necessary to thwart the
> result.

This use of force statute isn't limited to law enforcement officers and can be invoked by anyone, even someone who isn't an adult or someone who has a criminal record.

Law buried away elsewhere in Colorado clarifies that this immunity from criminal liability also provides immunity from civil liability.

Also, the fact that suicide is not a crime, and the fact that someone can be punished punitively for attempting suicide, does not mean that attempting suicide is without legal consequences. Not all things that are illegal or legally regulated are crimes. Attempting to commit suicide isn't a crime, but it isn't precisely legal, in the sense that it can be done with no legal consequences for the person doing it either.

In general, every state authorizes a 72 hour involuntary mental health commitment, on the say so of any of a long list of mental health and law enforcement officials without a prior court order, and authorizes further involuntary commitment with a court order, if someone is a danger to themselves or others. This may not be a criminal statute, but it still deprives the person attempting suicide of their liberty.

For example, Section [27-65-105(1)(a)(I)][2], Colorado Revised Statutes states in the pertinent part that:

> When any person appears to have a mental health disorder and, as a
> result of such mental health disorder, appears to be an imminent
> danger to others or to himself or herself or appears to be gravely
> disabled, then an intervening professional, as specified in subsection
> (1)(a)(II) of this section, upon probable cause and with such
> assistance as may be required, may take the person into custody, or
> cause the person to be taken into custody, and placed in a facility
> designated or approved by the executive director for a
> seventy-two-hour treatment and evaluation. If such a facility is not
> available, the person may be taken to an emergency medical services
> facility.

Police officers are among the persons identified as intervening professionals who are authorized to place someone under a 72 hour mental health hold without a court order pursuant to this statute.

  [1]: https://law.justia.com/codes/colorado/2022/title-18/article-1/part-7/section-18-1-703/
  [2]: https://law.justia.com/codes/colorado/2022/title-27/article-65/section-27-65-105/