It's hard to grasp the idea that a loving God would punish His children. But even though He gets angry, it is not long-lasting; his favor is for a lifetime.
God took Moses to a mountaintop to show him the land that he would never enter. Moses died just outside the Promised Land. Although God's anger is temporary, His favor is forever. Moses may have missed out on settling in the land he had spent most of his life moving toward, but the loss was only temporary. In the moments after Moses was blocked from the promised land, he was taken into eternal life with his Father. God carried Moses to eternity.
Just like with Moses, our disappointments will not last. The God of justice, forgiveness, and salvation will carry us too. Joy is coming.