I have a PIC24FJ32GA002. I think I killed by accidently exposing it to 5V instead of the rated 3.3V. It was very quick, less than half a second. I am not able to get it to communicate with my programmer, but I didn't test it beforehand, so I am not sure if my circuit is wrong or I have wired something up incorrectly. Unfortunately I can't get any more MCUs any time soon. Is there any way to determine if the MCU is truly dead?
You could try wiring up the bare minimum you need - supply and ground pins (decoupled), MCLR, PGC and PGD - and seeing if you can program it. If that doesn't work the only sure way to find out if the chip is functional is to get another one. If that works, the first chip is faulty.
I always buy at least two of any MCU.
Are you looking for a general solution to verify RAM, Flash, and peripherals, or just to determine if it's still programmable? It reads like you're looking for the latter, but I'm not sure that's wise.
If you've exposed it to conditions outside its ratings, it's likely to have something wrong with it. Whether you discover it now, later, or never (there was nothing wrong), I wouldn't want to have to keep asking myself "Is it the MCU?" every time there was a fault.
If this is for production, you should have a test set, which verifies all the functions of your device. In that case, if it passes the tests, it's good. If not, toss it.
Is there a sure-fire way to detect every failure? No.
Failure or damage can occur in a variety of ways, some of which are very subtle.
Fundamentally, ass you can really do is exercise whatever aspects of a device you are intending to use, in such a way that any erroneous behavior is detected.
Some failures are obvious (failure short-to-ground, for example). On the other hand, if you have damage to an onboard peripheral which causes 1 bit error every 500 bytes, how would you check for it?
Anyways, I would imagine that the PIC may be ok. I once accidentally ran a PIC12 on 12V for long enough that it actually melted my breadboard (the voltage regulator failed short input-output), and it apparently kept working fine, it just got really hot.