What is the correct mentality to have about death? On one hand I'm told it should be feared because of the punishment of the grave and the questioning and how scary everything will be. But on the other, I see it as finally leaving this realm where you can't talk to Allah directly (as in you don't literally hear an answer) to a realm which is much better for the believers, which even if I'm not one, I believe Allah is so Merciful he would forgive my shortcomings and accept me into his believing servants. Is my way of thinking a correct mentality?

You stated the proper balance:

1- On the one hand, let death deter you from sins and from being materialistic.

2- On the other hand, see death as a graduation for you if you are prepared. As long as you have faith in Allah, you follow the Qur’an and the Ahlulbayt, and you are trying your best to keep away from sins, then see death as victory, as going back to Allah and as experiencing the mercy of Allah to a greater extent.