CPR is performed when the heart has stopped but the brain is still alive. We have a general rule that a Cohen is not allowed to come in contact with a dead body. If so, does this mean that a Kohen cannot perform CPR?
To sum up what's been said so far:
- A Cohen, like any other Jew, is obligated to attempt to save a life.
- I'm not sure whether someone whose brain is alive but heart has stopped temporarily is halachically "alive", "dead", or possibly something in between.
- Again, this state doesn't naturally last for very long, so usually the discussion was about whether brain death was enough, or if we had to wait longer for heart-death.
- Also note that when we say "heart-death" (if I understand correctly), usually we mean where there is no nervous activity regulating the heart, and restarting it won't help. That's different from someone needing CPR, where once the heart gets restarted, it should stay going just fine by itself.
- Even IF the person is halachically dead, see this article from R' Zilberstein. Tosfos Bava Metzia 113b s.v. לאו כהן אתה says that Eliyahu, a Cohen, was allowed to revive a dead boy; while this involved contact with a corpse, it was permitted for "pikuach nefesh" -- though the boy was already dead, he was in danger of staying that way, which is also called "pikuach nefesh."
- If someone is alive and in grave danger, we override other prohibitions even if there's a slim chance that this action will save their life. However, to restore life to someone halachically dead, we can only override prohibitions only if the odds of success are high. R' Zilberstein cites Netziv, She'ilta 167:17, observing that Eliyahu knew his efforts would almost-certainly be successful.
- Similarly, Chief Rabbi Unterman was asked several decades ago about whether we can cut open a dead body (which is normally prohibited) to harvest its heart, for use in a heart transplant. He allowed it only if the success rate was >50% (which it then wasn't, and now is), as the recipient will have his old heart removed, at which point he's not Halachically "presumed living."
- So if someone needing CPR is Halachically alive, we'd be obligated to do anything to save them if there's any small chance it will help. If they're halachically dead, we can violate prohibitions only if the success rate is high, I'd assume.
- What's the success rate for CPR? I Googled it and saw lots of different numbers; looks like a lot depends on how fast the patient gets urgent medical care.
- In short, ask your rabbi. But when in doubt, save a life first, ask questions later.
This has essentially been addressed in the comments to the question but the issue of halachic death was discussed in this question which is where I think is the appropriate place to discuss that issue.
With respect to CPR by a Kohen, as Sholom noted this is an issue of [at least safek] Pikuach Nefesh which is certainly permitted, furthermore the warning with respect to pikuach nefesh on Shabbos may apply here as well (One who asks sheds blood). Furthermore, unlike the caricature in "The Good Samaritian", the halacha not only expects a kohen not to stand by his brother's blood, but if a kohen chances upon a dead body which is unattended to he is obligated to attend to it's burial if nobody else present can do it for him (Y"D 374) (meis mitzvah is the term as I recall).