The purchase of your own home is such an exciting and rewarding experience, but not all homeowners get to enjoy that satisfaction for 30 or 40 years. If you are one of the millions of homeowners who has gone through a foreclosure, whether due to a divorce, health problem, or job loss, you know that it is a painful and stressful experience. The good news is that every storm passes, and the impact of your foreclosure will as well. You can begin rebuilding in order to stabilize and look forward to owning your home again one day.

Keep Tabs On Your Credit Score

There’s no way to get around it—a foreclosure will hurt your credit score. The higher your score was before the foreclosure, the farther it will fall afterward. In the year or two immediately after your foreclosure, you will find it hard or impossible to get a loan or new credit card, so you want to use that time to improve your score as much as possible and track it carefully. 35 percent of your credit score is based on your payment history, so do your best to pay all of your other financial obligations early or on time. Your credit utilization ratio accounts for another 30 percent, so try to pay down your existing credit cards. As time goes on, this effort will help you rebound.

Minimize Your Debt

The financial icon Dave Ramsey, who himself experienced bankruptcy and hit his own financial rock bottom, offers six step plan for regaining financial freedom. Step one is placing $1,000 in a mini-emergency fund, and step two is the debt snowball. Pay off each debt showing on your credit report, one at a time, starting with the smallest and working toward the largest. You may need to sacrifice in order to do this—stop eating out, don’t splurge on technology—but the effort will help you regain your traction.

A foreclosure is an emotional experience just like a divorce or death. Don’t beat yourself up too badly over it, because bad things do happen to good people. Just give your best effort to recovering and never making the same mistakes again.