Many places make it illegal to allow police to intercede. In most places, the police can intervene if they believe a crime is about to be committed.
There is a huge line between someone who is terminally ill, and wants to die on their own terms, and someone having a mental health crisis. The first should be legal, but still needs support and checking, the 2nd need immediate help.
I know, first hand, how strong the illusion is, that depression causes. It's like having a mountain poised to avalanche down on you. You just want to escape, even if it's via extreme means.
The key is that it is still an illusion. It's a paper tiger, once you get a handle to fight it, it dissolves like mist. Most people who attempt suicide, due to mental health, are not dealing with a steady chronic condition. They are at a crisis point. If they receive appropriate help, clawing their way back is perfectly possible for most.
There are exceptions, but they are quite rare. I would bundle them with terminal illness, though proving that is a lot harder. It's also a balancing act between being OK with dying, and being of sound mind to make that decision.