In theory, the mitzvah to preserve a life overrides almost every other mitzvah, and serious mental health is certainly included in that. The Talmud talks about extinguishing a fire on shabbos if someone is suffering from depression and it's causing them anguish in a way that could be life-threatening.
A not-uncommon example today? A lot of people with eating disorders should not be fasting on Yom Kippur. It can trigger a bad cycle of "if not-eating is holy, then I can be extra holy by doing lots more of not-eating!" (To take it a step further: if someone tells the rabbi they're mentally sound but have issues with their blood sugar, the rabbi may ask if they can measure the food in small amounts and eat it every ten minutes. If someone has an eating disorder, any encouragement of "measure/cut/time" is not going to lead to healthy behavior.)
Practically, these calls should be made involving consultation with a competent mental-health professional, plus a rabbi who understands the mental-health concerns -- or better yet, get the rabbi to talk with the mental-health professional.
If you leave this to any individual to try and make their own call, some are going to declare it a mental health emergency when it's not... and a lot more are going to put themselves at risk in ways they shouldn't be.
Lastly, the hope and plan is that this condition will not be a permanent one. Maybe someone is currently in a bad state that they can't go to synagogue ... but the goal would be to work with competent professionals to get to the point that they could.
Some of your examples, by the way, are violating "thou shalt not"s, while others are omitting "thou shalts", for which the threshold may be different. (Pru urvu is a complicated issue with a lot of other considerations -- talk to a rabbi.)