While no one ever really hopes that they’ll be fired from a job that they love or they need, losing your job for one reason or another is sometimes a reality of life. And although you might feel like your whole world has come crashing down as a result of being fired, it’s important that you keep your wits about you in the hours and days following this event so that you can set yourself up for success in the future. To show you exactly how this should be done, here are three things you should do if you’ve just been fired from your job.

Consider The Reason For Your Termination and The Legality Of It

As soon as you’ve found out that you’re being fired, you should consider the reasons for you losing your job and see if there is anything illegal behind that reasoning on the part of your employer. According to Alison Doyle, a contributor to The Balance Careers, you may be able to sue your former employer for wrongful termination if you feel that you’ve been fired for reasons that aren’t legal. If you feel that you were fired for a reason that’s less than legitimate, you might want to consider speaking to a lawyer to see if you have a case. While this might put one more thing on your plate while you’re about to start your search for a new job, it’s important that you ensure that your loss of a job happened legally.

File For Unemployment Benefits

For the in-between time after you’ve lost your job but before you’ve found a new one, you may be very worried about how you’re going to pay your bills and afford the things you need for yourself and your dependents. To help with this, Aaron Taube, a contributor to Business Insider, advises that you file for unemployment benefits as soon as you’re able. Depending on the reasons why you were fired, you may or may not actually qualify for these benefits. However, you really won’t know until you try. So to give you a little leg up while you’re searching for a new job, make sure you make filing for unemployment benefits a priority.

Prepare Yourself To Find New Employment

Once you’re ready to start looking for a new job, you should take some time to prepare yourself and your professional portfolio to be out on the hunt again. According to Emma McGowan, a contributor to The Bustle, your preparation should include things like updating your resume, becoming more active on social media platforms meant for professionals, getting your references in order, and mentally preparing for interview questions about your previous firing.

If you’ve just been fired from your job, consider using the tips mentioned above to help you get yourself back on balance.