It is really sad and distressing that it all happened at the spur of the moment. Do not sign the legal documents before meeting the right lawyers. Such injustices can be questioned but While joining did you sign any contract documents, But were you the only person where laid off or a bunch of people too, If companies are going through a tough period where they don't see profits, chances of layoff may be high. It's an uncertain world. Start looking for new opportunities, post your resume in all job portals. Don't stress too much about this. Plan what next.
Next Steps
Consult a counsellor, a lawyer
Health Tips
Read the agreements carefully before joining also while forcefully made to resign from the company.