Imagine being able to erase your most traumatic memories. For a soldier, that would mean no longer being haunted by images from the battlefield. For a movie critic, no longer recalling having seen “Paul Blart: Mall Cop 2.”

It’s just one of the fascinating peeks into the mystery of the human mind chronicled on “Memory Hackers,” airing Wednesday at 9 p.m. on PBS’ “Nova.”

“Memory is an inherently interesting thing,” the show’s writer, director and producer, Michael Bicks, tells The Post. “You think you know what it is, but when you think about it, you realize that you don’t.”

Many of us assume that memory is like a faithful recording of our lives stored in our brains, persistent and unchanging.

Shockingly, that’s not the case. Researchers have discovered that memory is changeable. The act of recalling something alters it.

Forming memories actually causes a physical change in the brain — a seismic discovery made by Nobel Prize-winning ­neuroscientist Eric Kandel of Columbia University. When you create a memory, new synaptic connections grow between neurons in the brain. But each time you call up a memory, it must then be resaved like a file on your computer — and it gets modified in the process.

This finding has led scientists into “Eternal Sunshine of the Spotless Mind” territory, the 2004 Jim Carrey movie about a man who has a memory of a bad breakup erased.

Dutch psychology professor Merel Kindt has seemingly found a way to erase the emotional anxiety associated with bad memories without erasing the memories themselves.

Working with arachnophobes, she discovered that subjects who were given a drug called ­propanolol after being exposed to a spider were later able to handle the creatures without fear. The drug is believed to change the way a memory (in this case, terror associated with spiders) is resaved in the brain after being accessed.

But what’s the point of manipulating memories anyway?

“It might be possible to work with PTSD [post-traumatic stress disorder], and that’s a huge deal,” Bicks says. “It could happen very soon.”

Great. Sign us up for a complete wipe of this presidential primary season.