In the Vorkosigan Saga by Lois McMaster Bujold...
This one is very much about Miles. He's having to deal with a particularly nasty side effect after his death/revival that ends up with him being kicked out of the military. That particular event was one of those that I find hard to read. He's losing everything he's ever wanted and everything he's worked for for most of his life. It's just heart-breaking watching that happen.
So he's completely lost and depressed and really doesn't have a clue what to do with himself and Ilyan (his former boss) gets sick, something either natural or external causes his memory implant to start to break down; the end result of which is him losing all concept of time. He jumps from year to year in his own head and is very rapidly going crazy.
Miles gets the Emperor's help and gets himself appointed in charge of figuring out what's happened. It starts out as a means to an end (helping Ilyan being the end) but along the way he starts to find a new purpose for his life so it helps him too.
I found the Ilyan stuff really interesting. He's had this implant for basically his entire adult life that gives him an artificial eidetic memory. So everything he has ever seen or heard is remembered exactly. When that is removed he has to almost learn how to think all over again. There's a really cute scene when he discovers maps, having never had a need for one he'd never used one before and it has an almost magical feel to it for him.
Oh, and there's a rather huge personal change going on for Gregor in and amongst it all too.