If you stay in Switzerland after losing your job, you can keep it in hock either at the former employer or at the cantonal pension fund (if you do nothing, it will get transferred to the cantonal one automatically after a certain time, I did that once when I switched jobs and forgot to transfer). If you leave Switzerland, you can cash it out if you provide the current fund with proof you are leaving, your employer will tell you that as part of any exit interview.
Courage for the job situation tho! I know how it feels