After 40 years teaching middle school English, remedial reading and study skills, Judith Jones looked forward to retiring to Merrimack, where she’d live close to her daughter and son-in-law.

What she didn’t plan for were mood and memory changes that increasingly upended her life.

“For the first five years I got really upset the first day of school because I knew I wasn’t going,” she said. “I turned 70. Then I turned 75.”

Jones found herself forgetting familiar people’s names, including TV actors she’d known for decades, and missing appointments with doctors and friends. Despite constant knee pain that diminished her ability to get around daily, she was too afraid to get knee-replacement surgery. She eventually became too anxious to drive.

“I’d always had a really good memory,” said Jones. “At my age you start thinking Alzheimer’s.”

Her primary care doctor referred her to Elliot Health System’s Memory and Mobility Center, where evaluations, including a brain scan and neuropsychological testing, confirmed she wasn’t suffering from dementia at all — but depression and anxiety which similarly rob memory and thinking.

The prescription: online courses in Russian and British literature, regular book club meetings, and cognitive therapy three times a week to increase her stimulation and social interaction, replace her default anxiety with reasoned thinking.

“Now my memory issues don’t bother me,” she said. “I watch ‘Jeopardy!’ and play on a trivia team. If I don’t know the answer now, I know it will come to me. The awareness of what things are like when you’re 75 really helped.”

Anxiety can come from trying to do too many things at once, Jones discovered in counseling. “Now I stop and think before I do something, and move at a slower pace.”

When she’s afraid to drive to Massachusetts to visit friends, “I know to take a deep breath, and stop and think, what is the problem? Is it reasonable? By thinking about it, I’ve found it doesn’t make sense to be afraid.”

“Now if I recognize someone and start a conversation, I’ll say, “I’m awfully sorry, I can’t remember your name. And you know what they say? “I’m like that, too.”

Ross Gourvitz, the center’s program director and a neuropsychologist, estimates depression and anxiety cause memory upheavals for 10 to 15 percent of those who come to the clinic, and likens the mechanism to familiar technology.

“Imagine you have a Windows computer. One window is open and you’re thinking well. Another window opens for stress, then another for anxiety and another for depression. You’re compromising your system’s resources, so you can’t use your thinking at 100 percent,” said Gourvitz. “Once you close these windows, it frees up a lot of space.”

Dr. Santharam Yadeti, MD, the center’s psychiatrist and director of outpatient behavioral health at Elliot Hospital, said mental illnesses such as schizophrenia, post traumatic stress disorder, obsessive compulsive disorder, attention deficit hyperactivity disorder, and substance abuse and addiction also compromise cognition and memory. The brain is a delicate, synchronized network easily overwhelmed by internal distractions, he said, including by negative thinking and intrusive thoughts.

Yadati said it’s critically important to rule out effects of medications, such as painkillers, sleep aids, benzodiazepines for anxiety, and even eyedrops, which can cause dementia-like lapses and cognitive slowdowns that resolve when the medication is stopped.

Silver Linings is a continuing Union Leader/Sunday News report focusing on the issues of New Hampshire’s aging population and seeking out solutions. Union Leader reporter Roberta Baker would like to hear from readers about issues related to aging. She can be reached at rbaker@unionleader.com or (603) 206-1514. See more at www.unionleader.com/aging. This series is funded through a grant from the Endowment for Health.