For the sake of interest...if you're familiar with the tv show "Fringe," may address something similar, in the character of Dr. Bishop. (Incredibly arrogant, he became a better man after certain sections of his brain were cut out...a process he himself wanted done...amazing what self-hatred can do)
Walter Bishop did that to target certain memories that haunted him and not as a means of cognitive improvement. IIRC it actually made him disfunctional and so not necessarily a "better" man but simply more at peace with himself.
If memories could be pinpointed and removed in the future I'm still not entirely sure if it would even be desirable to remove harmful memories because then you would risk repeating any mistakes that happened during that time period.
One of my favorite sci fi novels is Flowers for Algernon, which deals with the concept both in terms of improvement, and then decline. It's a heartwrench of a story (though you might find it a bit dated if you read it now; it was originally written in '58 and it won a bunch of awards so people have always tried to copy what made it great), but it very much deals with the continuity of the person through massive changes in mental acuity.
We could also talk about the Bobiverse series of novels, where a guy has his mind uploaded into a space exploration probe, and the planet breaks out into nuclear war when he's launched on an interstellar route, along with several others from other nations, in various directions. "Bob" is now entirely inhuman; he's a robotic space probe and his "mind" is code and hardware. He eventually realizes he needs to build a resource base to get back to Earth and see if he can help survivors, but he can't do it alone, so he does the only thing he can with his resources; he builds another probe and copies his own mind. And does it over and over and over. The different Bobs all copy slightly "different", but they're all Bob, and it gets fucky from there. I wouldn't say it's high literature, unlike Algernon, but it's an interesting take at least.
Astrid said it to him..."It made you a better father."
He didn't care for cognitive improvement when he remembered what a colossal dick he was. And when the process was reversed in the last season, he demanded that his brain be returned to it's "impairment." It's telling in the story that as much as he admired high intelligence, he didn't believe it made a better person.
- - - Updated - - -
I'm familiar with Flowers for Algernon...and the real tragedy, which wasn't him losing his intellect so much as remembering and knowing what he lost. (Had he forgotten I think that would have been a mercy)