I was reading in 1 Nephi 4:13, where it says that it is better for one man to die than for a whole nation to dwindle in unbelief, and that the Lord slayeth the wicked for His righteous purposes. I cross-referenced this to Alma 30:47. Is that wicked man who is killed then lost forever? Would one righteous man also be killed so that a whole nation might be saved? Could that be the case with the Savior?
A wicked man (or woman) will only be "lost forever" if he (or she) will be willingly unrepentant. Only those who have the knowledge of the gospel and voluntarily rebel against the will of God will be lost forever.
1 Nephi 10:20-21
"Therefore remember, O man, for all thy doings thou shalt be brought into judgment. Wherefore, if ye have sought to do wickedly in the days of your probation, then ye are found unclean before the judgment-seat of God; and no unclean thing can dwell with God; wherefore, ye must be cast off forever."
As to the case of a man dying for the salvation of a nation, yes, we are talking about the Savior Jesus Christ. Although we might say (in a very limited sense) that that expression could also apply to: (1) a number of righteous individuals throughout history who lost their lives in the service of their fellowbeings; and (2) a number of wicked individuals whom the Lord removed from the earth in order to prevent them from spoiling a whole nation.
But notice that in each of these instances it would be the Lord's judgment, and not men's, that would determine whether an individual's mortal experience should be terminated or somehow abbreviated.