Some sources claim that the concept of atheism can be dated as far back as 5th century BCE; I'd have to imagine, however, that the idea of not believing in a supreme being goes back even further than that.
If you're frightened of dying, and you're holding on, you'll see devils tearing your life away. But if you've made your peace, then the devils are really angels, freeing you from the Earth.