When you’re having surgery, you might think your only job is to show up at the right time. The rest is in the hands of the doctors and nurses, right? Wrong. You hold the key to having a successful surgery and faster recovery. The secret? You have to train for ­surgery—physically and mentally. 

Surgery is tough on your body and spirit. I have found that physically, major surgery—one where you receive a general anesthetic—is as hard on your body as running a 5K race. You wouldn’t run a race without taking steps to get in shape for it. Along the same lines, you need to prepare and get your body in shape for your operation. Most surgeries are elective, and you and your surgeon can pick a date a few weeks to a month out, giving you time to prepare.  

Your whole body—not just the one spot where the surgeon cuts—is affected by the strain. A training plan that includes physical, spiritual and practical preparation has had great success at University of Michigan, where I started a program called Michigan Surgical Home and Optimization Program. We found that patients who got wellness coaching and followed the plan before surgery had shorter hospital stays and were more likely to go home and not to a nursing home. Here’s the plan…

1. Get walking. Simply walking more before surgery can reduce your hospital stay by one day.

Don’t worry if you’re not currently fit or active. In my clinical experience, only about 5% to 10% of people having surgery are. What’s important is ­improving your current level, not reaching a particular step goal. Walking is crucial because it strengthens muscles and bones and increases cardio fitness and endurance. The goal is simply to increase the number of steps you can currently walk. If you start with 1,000 a day, maybe you can soon do 1,200 or more. 

If walking is hard for you, it’s fine to do a half-hour a day of another activity, such as swimming. But the reason we stress walking is that walking is important in getting up and moving after surgery, so it’s good to practice. 

2. Don’t try to lose weight—but do eat a protein-rich diet. Good news: Unless your surgeon tells you otherwise, you don’t need to go on a diet. In fact, it’s not the best time to stress your body by cutting calories. Instead, focus on eating healthier before surgery. It’s especially important to eat enough lean ­protein—especially skinless chicken breasts, turkey, fish and beans—because it helps build muscle mass, keeping you in optimal shape. It’s not new information, but it bears repeating—eat at least five to seven ounces of protein a day.

Beyond that, opt for a whole-foods–based diet, with five to seven servings of fruits and vegetables a day and whole grains. Limit saturated fats like the kind you get in bacon and butter. Cut back on chips, cookies and other ­processed foods. The goal is to reduce the unnecessary work your body has to do before and after surgery.

3. Make sure your doctor knows as much as possible about you. Surgery is intimate. It’s really important that your surgeon knows and understands you. If your doctors and nurses don’t ask you questions, proactively tell them about yourself, including your profession, hobbies, travel plans. Doctors want to know ahead of surgery how we can help you fully enjoy your life. Why that matters: Some big operations aren’t for everyone, and the marginal benefits they’ll give may not be worth the other issues surgery creates.

Example: My father is an 80-year-old guy with minimal health problems. One procedure a doctor suggested for melanoma would prevent him from ever playing golf again. He lives to play golf. Because my dad said, “One of my most important goals is continuing to play golf every day,” the doctor knew that this procedure might not be right for him, especially because less invasive options for his care were available.

Sharing personal details and your hopes for how life will be after this procedure will remind everyone that there’s a real person under the surgical robing. When I’m doing a liver transplant, it helps if I can say to the team, “That’s Mr. Smith. He’s a retired first-grade teacher. He really wants to get home in the next two weeks so that he can go to his daughter’s wedding. That’s his goal.” 

4. Come clean about your ­medications—all of them. Your surgical-care team will go through exactly which medications and supplements you should stop taking and when. For instance, you have to avoid fish oil supplements because they thin your blood and can increase bleeding. The problem is that patients don’t always tell the whole truth about all that they take, either out of embarrassment or fear. You’d be shocked to know how many people lie about taking opioids for pain and benzodiazepines for anxiety. You need to be up front with your doctor because it’s dangerous to abruptly stop taking these medications on your own. You can get really sick from withdrawal, and your doctor won’t know what’s wrong with you. 

Important: Be honest about your alcohol consumption, too. If you drink every day and find that you get tremors when you don’t drink, then you can’t just stop cold turkey—your doctor needs to know so that he/she can come up with a safe plan for you. 

5. Line up your support team. The biggest thing people do wrong before surgery is trying to go it alone to spare their loved ones (“I don’t want to bother anyone, so I’ll just take a taxi to surgery”). That’s a dangerous mistake that hurts everyone involved, but especially you. Having a support system actually helps you heal. Most of us get much of our energy and our fuel from our relationships. 

You actually get better care when you have family members in the hospital. They can advocate for you and help you feel comfortable at a vulnerable time, including getting assistance for you if the nurses are busy. They can think to ask the questions that your postsurgery brain doesn’t think of and they may better remember the information and recommendations from the doctors. Happily, hospitals now make it easy for guests to visit and stay longer hours.

6. Optimize your attitude. I’m a conventional doctor, but I’ve come to realize that the secret sauce in having a great surgery is a combination of spiritual ­factors—including an all-around positive attitude and a feeling of empowerment. A study in JAMA Network Open looked at almost 7,000 people over age 50 and found that the ones who have a lot of goals and a strong life purpose live a lot longer than the ones who don’t.

I see this every day as a transplant surgeon. We often can tell which patients are going to do better just by their attitude. One of the simplest things that you can do to improve your attitude before a health procedure is to focus on gratitude. Keep a journal, and ask yourself every day, What went well today? Write it down or keep a running list on your smartphone. Practicing mindfulness with techniques such as deep breathing and meditation also can help. 

Sooner or later, we all may face a health challenge such as surgery, but training with these mind/body tools can help you feel stronger, calmer and more empowered—so that you can ­return faster to the life you love.