Science Photo Library Paseika/Getty Images

Dying is bad, dying sucks, but it happens to everyone eventually. But here's the thing: If we dwell on the harsh reality of our own death too long we might just collapse into a permanent state of existential angst.

Enter our brains.

Researchers from Bar Ilan University in Israel and the Lyon Neuroscience Research Center discovered that as soon as we become aware of our own existence, and the fact we will one day die, our brains find ways to shield us from lingering on our own impending doom.

In short, our brains do a good job of convincing us death is something that happens to other people.

"The brain does not accept that death is related to us," said Yair Dor-Ziderman, one of the authors of the study, speaking to The Guardian. "We have this primal mechanism that means when the brain gets information that links self to death, something tells us it's not reliable, so we shouldn't believe it."

These days, with the threat of climate change and possible nuclear war, human beings seem to spend a lot of time thinking about the onset of oblivion. But our brains are protecting us from making things even worse.

To test this, researchers studied how participants' brains reacted to photos of themselves and photos of strangers. Fifty percent of the time these photos were accompanied by words like "funeral or "burial." Essentially researchers found that the brains' prediction system shut down when associating death-related words with their own image.

"This suggests that we shield ourselves from existential threats, or consciously thinking about the idea that we are going to die," explained Avi Goldstein, another author on the paper.

We're all going to die. Our rational brain understands this, but it still finds a way to help protect us from this harsh reality.

Thanks, brain.