Here they are
- Fasting as a sign of grief or mourning,
- as a sign of repentance and seeking forgiveness for sin,
- as an aid in prayer,
- as an experience of the presence of God that results in the endorsement of his messenger, and
- as an act of ceremonial public worship.
When tragic events struck in ancient biblical communities, fasting was often an expected response. When the Israelites lost a battle to the Philistines, “all the people went up and came to Bethel and wept; thus they remained there before the LORD and fasted that day until evening” (Judg 20:26, NASB). When David and his men heard of the death of Saul and the loss of the battle, they tore their clothes, “They lamented and wept and fasted until evening because Saul, his son Jonathan, the Lord’s people, and the house of Israel had fallen by the sword.” (2 Sam 1:12)It doesn't necessarily have to be death. Sorrow and suffering, drought and locust plagues are also mentioned. But it is particularly for these two examples in the above quote that we find parallels in the Book of Mormon.
Alma 28:5-6
This is after a major battle with many losses resulting in fasting, similar to the example with the Israelites and the Philistines. After these verses, Mormon interrupts the narrative with some "thus we see" statements and Alma's expressed desire to be an angel. When he returns to the narrative in chapter 30, the fasting is brought up again5 Yea, the cry of widows mourning for their husbands, and also of fathers mourning for their sons, and the daughter for the brother, yea, the brother for the father; and thus the cry of mourning was heard among all of them, mourning for their kindred who had been slain.6 And now surely this was a sorrowful day; yea, a time of solemnity, and a time of much fasting and prayer.
Now their dead were not numbered because of the greatness of their numbers; neither were the dead of the Nephites numbered—but it came to pass after they had buried their dead, and also after the days of fasting, and mourning, and prayer, (and it was in the sixteenth year of the reign of the judges over the people of Nephi) there began to be continual peace throughout all the land.I find the expression, "the days of fasting and mourning" particularly interesting. According to Jewish custom, there is a specific mourning period, or rather periods, that last for a given number of days. The shiva that lasts for 7 days, the sheloshim that lasts for 30 days and the aveilut that lasts for 11 months, each with certain restrictions and obligations.
Another example is Helaman 9:10
And it came to pass that on the morrow the people did assemble themselves together to and to , at the burial of the great chief judge who had been slain.Again we see similarities to one of the Old Testament examples quoted above. Just as the people mourned Saul's death and fasted, so the Book of Mormon people mourned and fasted when the chief judge had died.