Edith Piaf, the French idol who popularized the song “Non, je ne regrette rien” (No, I have no regrets), was far from an example of healthy aging, dying of liver cancer at 47. But new research published in Science shows that a philosophy of “no regrets” may be critical to emotional health in later life.

Researchers imaged the brains of 21 healthy young people, 20 people who had developed depression after age 55 (they were mainly in their 60s at the time of the study), and 20 healthy senior citizens. While the participants were being scanned, they played a video game in which they opened a series of boxes, moving sequentially from left to right. Eight boxes were presented in each trial and opening each revealed either “gold,” which had a certain money value, or a picture of a devil, which meant the loss of all the winnings from the prior boxes.

Participants could choose to stop and collect their winnings at any point. At the end, the position of the devil was revealed, providing players an opportunity to see whether they’d stopped at the right time and won the largest possible amount. This, of course, carried potential for regret — even though the game was primarily one of chance, not skill.

The more times people failed to collect the maximum amount, the more risks they tended to take in the next trials — a change in behavior aimed at minimizing remorse in the future. However, this effect was seen only in the young and in the depressed elderly. The healthy older people had seemingly learned to dismiss regret and not let it affect their decision-making.

Differences were also seen in the brain responses of these groups. When a missed opportunity was revealed, both the young people and the older depressed folks had reduced activity in a brain region associated with reward known as the ventral striatum. A similar response was seen in the healthy elderly only when they actually lost money — not when they didn’t win all that they could have. They didn’t see the unrealized gains as losses.

Instead, when they missed a chance to win big, the healthy elderly showed an increase in brain activity in a region called the anterior cingulate. This region is associated with emotional control. The authors speculate that in order to regulate their sense of regret, healthy older people tell themselves that the outcome is “determined by factors they can’t influence (chance / the experimenters) whereas depressed elderly blame themselves for the outcome.”

Similar results were found in another experiment, which compared the physiological responses of healthy elderly people with those of people suffering depression. Again, the healthy elderly didn’t have the same physiological responses to regret that were seen in those with depression.

Critically, these differences didn’t affect overall performance. That is, taking more risks in response to missed opportunities wasn’t a better strategy, suggesting that, at least for this task, the lack of response to potential regret doesn’t impair decision-making abilities of healthy older people.

The authors conclude: “Disengagement from regret experiences at a point of life where the opportunities to undo regrettable behavior are limited may be a protective strategy to maintain emotional well-being.” In other words, in our youth, we may harness feelings of regret to make better decisions in the future. But when we’re older — and the likelihood of second chances diminishes — feeling regretful doesn’t do as much good.

Consequently, teaching older people to dismiss regrets could also help prevent or even treat their depression.

Indeed, a spate of new research now suggests that having a long lifespan may actually be an evolutionary advantage — middle age may be a time of life when people are primed to lead and teach. Other studies find that happiness and other positive emotions increase with age. All of this presents a much brighter picture of aging than the traditional view of simple decline. This, too, may help us shed regret and retain emotional health throughout life.

Maia Szalavitz is a health writer for TIME.com. Find her on Twitter at @maiasz. You can also continue the discussion on TIME Healthland‘s Facebook page and on Twitter at @TIMEHealthland.