Compensation paid after severance and payable solely because of severance (and not work performed) is not eligible compensation for 401(k) contributions.
Compensation earned during employment (regular wages, commissions, bonuses) that is paid* after severance is eligible compensation if paid by the later of:
(a) 2½ months after severance; or
(b) The end of the Plan year during which the severance occurred.
*If compensation is paid in the next plan year but within a few days due to timing of pay dates, can include in either year, but must be consistent.