nope. if the lawyer (or whoever over sees this) has even the littlest bit of doubt no one signs anything. and whatever you wanted doesnt matter
Note that I am not a lawyer, this is a layperson opinion.
The point is that with suicidality, it hopefully won't be apparent to the lawyer at the time of signing that you were not of sound mind. So the will gets signed, and when you die and the will is administered, questions over your capacity
only come up if someone wants to challenge the will, and that someone can only be a person who missed out on an inheritance and believes they
should have been entitled to one (such as your family or dependents).
Additionally, in the domain of wills, the concept of not being of sound mind mainly refers to disorders directly affecting
perceptions of reality. So the manic phase of bipolar (as someone mentioned), psychotic states due to schizophrenia or drug use etc. States where you genuinely don't
understand at the time the proper implications of leaving your money to someone, such as a stranger instead of to your family. Mood disorders that make you more likely to suicide, and even may be the direct cause of your suicide, do
not automatically mean you were not of sound mind for financial decisions. The condition needs to affect your
capacity to decide where to leave money. I suppose someone suffering from such profound depression that they believed all humans were unworthy of happiness, and so decided to will their assets to be destroyed rather than left to family, might constitute depression affecting their decision-making capacity. But whether or not that depression was
also the cause of their suicide isn't immediately relevant.