Believe it or not, there is technology being developed to erase memories, just like in Eternal Sunshine of the Spotless Mind. From UPROXX:
It’s long been held that there can be benefit to erasing memories; after all, if you’re constantly reliving a painful memory, getting rid of it sounds like bliss. And now, there’s actual science that lets us do this.
The basic idea is to blast your noggin with electricity while it’s transferring memories, like of like yanking the power on a hard drive while it’s transferring files. OK, so that’s an oversimplification, but that’s essentially how memory erasing works, according to Nature:
"The team later prompted patients to recall only one of the stories by replaying part of that slide show. Immediately afterwards, when the reactivated memory is thought to be vulnerable, the patients received electroconvulsive therapy. One day later, when given a multiple-choice memory test, patients were significantly worse at remembering details from the reactivated story, performing near chance."
If you were wondering, yes, electroconvulsive therapy is “shocking mentally ill people with electricity.” As bizarre as it sounds, ECT does actually work in specific cases, even if nobody really knows why, and it’s usually paired with drugs to treat depression. It is also the last resort, however.
This still needs a lot of research; the memories eventually come back, so this method of memory erasing isn’t perfect. But it seems likely that sooner, rather than later, we’ll all be living in a Jim Carrey movie. Hey, at least it’s not The Number 23.