29 Now they wept because of the fear of being slain. Now when Ammon saw this his heart was swollen within him with joy; for, said he, I will show forth my power unto these my fellow-servants, or the power which is in me, in restoring these flocks unto the king, that I may win the hearts of these my fellow-servants, that I may lead them to believe in my words.
30 And now, these were the thoughts of Ammon, when he saw the afflictions of those whom he termed to be his brethren. (Alma 17)
His joy did not stem from their fear of death. Rather, he understood that fear indicates that a person's heart is open and possibly willing to believe the word, so that the "power which [was] in [him]" could "win their hearts."
Compare this with Alma-2's reaction after seeing the afflictions of the poor Zoramites who were cast out of their synagogue:
6 And now when Alma heard this, he turned him about, his face immediately towards him, and he beheld with great joy; for he beheld that their afflictions had truly humbled them, and that they were in a preparation to hear the word. (Alma 32)
Afflictions can lead to great joy if it brings about humility and repentance. This is a major theme of Alma-2's sermon.
16 Therefore, blessed are they who humble themselves without being compelled to be humble; or rather, in other words, blessed is he that believeth in the word of God, and is baptized without stubbornness of heart, yea, without being brought to know the word, or even compelled to know, before they will believe.And of course Alma-2 teaches these people that making room in one's heart to receive the word will inevitably cause that heart to swell as the seed sprouts.
The work of conversion is all about "winning hearts" by inviting God's children to make room for the word of God.