If they were wary of dying, they wouldn't be in the business of terrorism in the first place. Also, they almost certainly believe in a better afterlife. Reminds of the old animated short: Saga of Bjorn[1].
The terrorist group that pioneered modern suicide bombs and was their largest scale user by far was multi-religious in its membership and had atheists in its leadership.
Obviously an Islamist group will tend to be different, but remember the British guys who were reading The Dummies Guide to Islam on their way to join ISIS?
The people carrying out terrorism (not the organisers higher up) tend not to be very bright or clear thinking. The are convinced blowing things up will make the world a better place.
[1]: https://www.youtube.com/watch?v=MV5w262XvCU