According to the American Heart Association, a heart attack can shave 14.2 years off the typical lifespan. But if you take the proper corrective and preventative steps after such a cardiac event, you can defy this rather grim prediction. Embarking upon a path to a new heart-healthy you, especially in the days immediately following a heart attack, may seem daunting, but patience, persistence, and the support of friends and family can help you through this difficult time, and you’ll do well to keep these tips in mind:

Sign up for cardiac rehabilitation. When breaking old bad habits, the more support and guidance you have access to, the likelier you are to succeed, and that’s what cardiac rehab is all about. A team of cardiologists, dietitians, physical therapists, exercise rehabilitation specialists, and psychologists will help you tailor a program in which you can shed the vices that led to your heart attack and replace them with healthy habits that will suit you well. Programs can last anywhere from two weeks to six months, but a study released a few months ago found that one that spanned three years showed an impressive 33 percent decrease in cardiovascular death and a 48 percent reduction in the recurrence of nonfatal heart attacks.

Get ready to let go of your old ways. If you smoke, drink, eat nothing but fried food, a heart attack is the universe’s way of telling that it’s time to stop. If you’ve ignored the statistics before, you may want to pay them some notice now: Smoking even just one to four cigarettes a day can triple your risk of heart disease; same goes for having a high level of trans fat in your blood. And though moderate drinking can be good for the heart, excessive drinking has been shown to damage it.

Give yourself room to change. Your life has been very literally threatened, and most likely, it has been upended with all the lifestyle changes you’ve been asked to make to stanch the damage that has been done to your cardiovascular system. Sure, you need to amend your ways, but you also have to cut yourself some slack. Remaking a lifestyle is no easy undertaking, but it can be done if you go slowly and set reasonable goals for yourself. Just remember: There is life after a heart attack, and it can be far better than the one you were living beforehand.