The great prophet Enoch had a vision that spanned the ages of the earth. He saw many people in many times. He saw the great wickedness upon the face of the earth. He saw the flood in the time of Noah wipe out all the people of the earth except for Noah and his family. Enoch's response to this vision was similar to many of our responses to death. "And as Enoch saw this, he had bitterness of soul, and wept over his brethren, and said unto the heavens: I will refuse to be comforted; but the Lord said unto Enoch: Lift up your heart, and be glad; and look. And it came to pass that Enoch looked; and from Noah, he beheld all the families of the earth; and he cried unto the Lord, saying: When shall the day of the Lord come? When shall the blood of the Righteous be shed, that all they that mourn may be sanctified and have eternal life?" (Moses 7:44-45). The blood of the Lamb that was slain sanctifies us, which sanctification is not just a purification of our sins but also a change in our very beings. Sorrow is replaced with exultation.
Joseph Smith, while a prisoner in the Liberty Jail pleaded, "O God, where are thou? And where is the pavilion that covereth thy hiding place?... Remember thy suffering saints, O our God: and thy servants will rejoice in thy name forever." (D&C 121:1,6). In reply the Lord comforted Joseph: "My son, peace be unto thy soul; thine adversity and thine afflictions shall be but a small moment; And then, if thou endure it well, God shall exalt thee on high" (D&C 121:7-8). What comfort comes from Him who descended below all and rose triumphant from the grave, victorious over death! The prophet Joseph Smith and his wife Emma experienced the loss of multiple children. Surely their grief was intense as they buried their little children amid the turmoil of the Restoration. Joseph said, "The Lord takes many away even in infancy, that they may escape the envy of man, and the sorrows and evils of this present world; they were too pure, too lovely, to live on the earth; therefore, if rightly considered, instead of mourning we have reason to rejoice as they are delivered from evil, and we shall soon have them again" (Teachings of the Prophet Joseph Smith, pp. 196-197).
Link to part 4 of this essay.