You would get a lump sum that's taxed at 40%. Otherwise you can try to negotiate to be on the payroll for 4months + healthcare. Also if in the US ask for medical (COBRA) to be paid for.
The problem is that most people think, hey I'm a hard worker and I'll never get laid off, so they don't prepare in advance contractually. Otherwise you take a big risk that you can just drop into another job.. That risk changes as you get older and with the market. People harp on unions all the time but this is something they do for its members.