Getting laid off is never pleasant — whether you’ve seen the writing on the wall or it comes as a total shock. As well as leaving a dent in your finances, a layoff may cause significant emotional distress.

There’s no way to make a layoff a happy experience. But there are ways to cushion the blow, allowing you to bounce back and start a job search in a positive frame of mind. Here’s what to do when you get laid off.

Get a layoff letter

Layoff letters (or laid-off letters) are supplied by your company’s HR department and explain that your position was eliminated for reasons beyond your control. Essentially, they let prospective employers know that poor performance or misconduct played no part in the layoff.

Layoff letters are typically included in the paperwork packages you receive when you’re let go. If you don’t receive one, get in touch with HR. Layoff letters are usually hard copies on company letterhead, but an email is also acceptable. Once you have your layoff letter, you can take it with you to interviews to help explain your situation to potential employers.

Find out where you stand on benefits and pay

Wondering how you’ll make ends meet is a natural reaction to being laid off. So, before you part ways with your employer, ask what you may be entitled to.

First, make sure you understand your health insurance options. Depending on the size of your organization, you may be eligible for coverage under the Consolidated Omnibus Budget Reconciliation Act (COBRA). Offering temporary coverage for up to 18 months, COBRA is designed to extend health benefits for unemployed workers. If you don’t qualify, search for coverage under the Affordable Care Act (ACA). You may be eligible for a subsidy.

Next is pay. You may receive a severance package depending on the company and your seniority. These typically include one to two weeks of pay per year with the organization. If you don’t qualify for severance, ask about the date of your final paycheck. If you’re owed vacation payouts or expense reimbursements, ask about those too.

Finally, register for unemployment as soon as you can. This will help ensure you have some income to support you while you are conducting your job search.

Give yourself some time to process the layoff

A layoff can be a blow to your self-esteem, with adverse (but usually temporary) effects on your mental health. Giving yourself time to experience and process your emotions is essential. It’s perfectly normal to feel angry, sad or scared, and there’s nothing wrong with taking a few days to catch your breath before kicking off a job search. If it helps, try some healthy coping techniques like journaling, exercise or meditation to help reset. If you’re having trouble getting out of the funk, don’t be afraid to seek professional help. The better your frame of mind, the more fruitful your job search will likely be.

Remember: any anger or resentment toward your former employer is temporary, whereas social media rants are permanent. Even if you quickly delete these comments, they can persist in screenshots or the memories of those who read them, damaging your reputation. There’s nothing wrong with venting, but ask a friend, family member or trusted mentor to lend you their ear for that purpose.

Update your resume

Before starting a job search, take some time to review, update and polish your resume. Refresh your skills and work experience sections, but don’t waste space explaining or justifying your current situation. Your layoff letter serves that purpose, and potential employers will expect you to be thinking about the future rather than dwelling on the past.

Once you’ve knocked your resume into shape, repeat the process with your other marketing materials. If you’ve never found the time to craft a polished and recruiter-friendly LinkedIn profile, now’s the moment. And if you remain on good terms with your former manager, why not ask them for a LinkedIn recommendation? This serves a dual purpose, highlighting your current skill set and demonstrating to potential employers that you have a professional, no-hard-feelings mindset.

Plan your job search carefully

Some people go to extremes after a layoff, either waiting too long to begin a job search or rushing headlong into it and spending every minute poring over job boards or firing off applications. While you don’t want to procrastinate, be kind to yourself and draw up a schedule that includes other activities. Pursue a professional certification or simply recharge your batteries by taking up a new hobby.

Don’t underestimate the power of networking in a successful job search. Reach out to your contacts, both in person and virtually, and see what leads turn up. Reply to LinkedIn posts by thought leaders in your field — you never know who might click through to your profile.

Finally, keep an open mind regarding the type of role that might advance your career. If opportunities are limited in your area, why not apply for a remote position at a company based elsewhere? If it’s hard to land a permanent job, consider a temporary or contract role where you can learn new skills.

Whatever your needs, working with a talent solutions firm like Robert Half can take much of the time and stress out of a job search. We’re in your corner and can help you get back on your feet following your layoff.