In nursing, but especially with codes, it's easy to fall into the "what could I have done more?" trap....don't do that to yourself b/c at the time you did everything you knew to do, and that's all you could've done. You did your best, now what will be will be.
Since you are not a spiritual person, I really have no advice, except don't beat yourself up over it and don't think you'll ever become immune to the pain, unless you've become too cold-hearted to care anymore. Seek friends to share the experience with....sharing it here is a good start btw!
Since I'm a spiritual person, that is where I draw my comfort from, b/c there is no other comfort to be found in such a tragic situation. Without my faith, I dunno how I would be able to deal with such terrible tragedies.