I froze.

My 52-year-old, hard-as-nails (and hard-bodied) personal trainer was asking me to lope sideways on the treadmill. With my feet planted on either side of the fast-moving track and clutching the side rails, I started to quiet-cry, heaving breath in and out.

“No excuses,” she barked in my ear.

I wondered why I was here. On my 40th birthday, I joined a gym. “I want to be fit and 40, not fat and 40,” I quipped to my husband, my mother, my friends. I hit a high of 180, and wanted to lose 40 pounds to reach my ideal weight, which I had easily maintained for years before and between my two pregnancies.

Friends of mine who embrace the body image movement discouraged my weight-loss crusade, saying I should accept myself: “Your new decade means your body has naturally changed. Love it.” However, my 40-pound weight gain was due to stress eating during a year-long recovery from injuries I’d sustained in a car accident when I was 37 – and I was determined to lose the last physical reminder of it.

I had been paired up with Renee because she had been in an accident with similar injuries. She put her hands over mine on the side rails, to pull them off, I expected. “I’m afraid to fall off,” I cried. “I don’t want to hit my head and get another concussion.”

Renee put her mouth to my ear and said, “I’ve been where you are. I can help you achieve your goals, but I’m going to kick your ass to make it happen.” She told me to go home and think about what I really wanted.

My next training session with Renee was humiliating. We were alone in the gym’s classroom: My body dwarfed hers in the wall of mirrors. “I used to look like you,” I said feebly.

It was true – despite gaining and losing a total of 115 pounds with my two pregnancies, I’d returned to a size 2. My body had been a very lean 135 pounds, with chiseled and striated arms, V-shaped torso and exposed abs. My extra weight was a scarlet letter on me – it exposed my lack of willpower and who I was after my accident: fearful, prone to extreme anxiety and daily panic attacks where I felt my soul leaving my body, a strange unreality. No one knew I physically pulled myself back into a solid version of me multiple times a day.

During that first session, Renee ran me through a gauntlet: Jog in place for 60 seconds, do 10 wide-arm pushups, 20 plank jacks, 40 mountain climbers. Barely 10 minutes in, I started seeing black spots and bent over, dry heaving. “There’s something wrong with me,” I croaked, as Renee forced me to sit on the shiny floor and pushed two pieces of gum into my mouth.

“There’s nothing wrong with you,” Renee said. “You’re really, really out of shape. But we’ll get you back.”

The next three months was gym hell: I saw Renee more than my husband. Every week I attended three of her rigorous high-intensity interval training classes and a one-on-one personal training session, along with my solo treks into the gym to spend 60 minutes on the treadmill walking at a four speed on a 15 incline (trust me, it’s brutal). I did lose 15 pounds though, bringing me down to 165, a number I hadn’t seen on the scale in more than a year.

When the weight loss slowed, I joined Weight Watchers. At first, I was gung-ho about tracking everything I ate through its online app, excitedly logging in my handful of chocolate-covered almonds or serving of pesto. Then, I stalled out and stopped tracking.

My Weight Watchers coach suggested the Simply Filling plan — eat as much lean protein, fruits, vegetables, low-fat dairy and whole grains as you want, and track foods not on the recommended list. I thought, I could do this. I lost 17 more pounds, hitting 148 pounds after another four months.

When Renee checked my body composition, my fat had gone down a few percentage points and my muscle had gone up the same amount. After having lost 32 pounds, I looked at myself in the mirror at the gym. It was hard to believe I was the same person as when I started. Yet, I still wasn’t the person I had been – and maybe I’d never be.

Working with Renee sometimes felt like a battle of wills since we’re both Type-A, workaholic personalities. I’d send her texts like, “Still 157 after two weeks!!!” She’d respond with, “Get off the scale! How do your clothes fit?!” Or she’d text and say, “You haven’t worked out in three days!!” And I’d respond, “I’ve been at work! I have to pay the bills.” And she’d come back with, “I work three jobs and hit the gym today.”

After cycling a four-pound weight range for two more months, I told my Weight Watchers coach I should cancel my membership. She told me, “You aren’t defined by a number on a scale. Focus on your learned lifestyle habits.”

One day, Renee said, “You’re looking good. How are you feeling?”

Looking at the slimmer me in the mirror, I had an epiphany: “I don’t have panic attacks anymore.” It was true: I hadn’t noticed it, but the constant feeling of anxiety and the physical reeling I felt when a panic attack was starting had quietly gone away. “You’re focusing on your body. You’re healing your mind that way,” Renee said.

It turns out that in addition to the physical weight, I’d been carrying the mental weight of panic, of not being in control of my life or my body from the accident.

Now, I have more mental and physical energy: I can run down a stretch of beach with my kids, lift them up into the air. I can plank like nobody’s business and do a 90-minute boot camp in the gym. I’m proud of the person I am.

It’s not always easy, but I focus on how my body looks and performs rather than the scale’s number. Whether I lose more weight or continue to replace fat with muscle and stay the same weight, I can be comfortable with who I am and rock my awesome 40-year-old body.

It’s like Renee always says to me, “If it doesn’t challenge you, it won’t change you.”