It’s natural to fear death, but here are some recommendations:
1- Remember Allah is merciful. When we die, we go back to His mercy. Believe in His mercy. In fact, Allah has more mercy on us in the afterlife than He does here in this world.
2- Avoid sins. Sins make us hate death.
3- Be prepared to leave this world. Be prepared for the hereafter. Do good deeds that make you look forward to Allah’s reward after death. See death as a graduation for the believer.
4- Reduce your attachment to this life.
5- Say La ilaha illa Allah 100 times a day.