The Swiss authorities online
Are you a foreign national and have you been granted a residence permit under the family reunification programme? In certain circumstances, divorced, estranged or widowed spouses and their children can stay in Switzerland following divorce or the death of their spouse/parent.
If you are from an EU/EFTA state you can apply for your own residence permit if your marriage ends (either through divorce, death or annulment) provided:
A divorced spouse’s or a child’s existing residence permit may be extended provided:
The dissolution of the marriage or the death of the spouse does not affect the right to settle in Switzerland.