Do you have much experience with 4e D&D?I have no tools in D&D to bring this into a challenge for characterization nor to resolve such a challenge.
In another system the player could have challenged the mind flayer's assertions, but would be risking finding out they might be true. I don't see how that could work in D&D without crossing the one bright line of authority in the game.
It's a bit of an open question exactly what tools 4e provides, because the skill challenge is - as presented - such an open-ended or un-nailed-down framework that (experience suggests) needs users to bring ideas and/or experience from outside to really get the best out of it.
I think a skill challenge might be able to handle the scenario you're describing. Of course it would depend on table norms - and of course so does everything, but for this sort of thing among D&D players the need for clear norms I think is especially important.
In my long-running 4e game - currently on hiatus while one of the players finishes renovating a house, which is a multi-year project! - we've had memory stuff happen with the PC wizard/invoker who turned out to be a deva invoker/wizard and who has memories of 1000 lifetimes. There's been GM narration as well as PC narration of memories, but not quite as confronting/contested as what you're describing. So I can't say I've actually done what you describe in a skill challenge. But I think it could be done. Salient skills would include History and Arcana (knowing stuff), Insight (sifting wheat from chaff in one's own mind) and Bluff and Diplomacy (vs the Mindflayer). Failure narration would probably be a mixture of straightforward causal failure and introduction of the undesired plot points/backstory. And of course as each false memory falls away, the PC would also suffer level-appropriate psychic damage!
(I see there being three rationales for the damage. (1) It's D&D, and furthermore it's 4e D&D which means all gonzo all the time. (2) It connects the failures to the most robust resolution currency system in the game - hp and healing surges. (3) At least the way we play at my table, it would provide a type of assurance that this trick isn't going to be pulled again - the fact that the PC suffers that mental trauma as s/he loses his/her false memories is something of a validation that it really is his/her true mind that is being revealed via the process. This third thing is a bit amorphous and I don't know if I've eplained it properly, but to me at least it feels quite important.)