None of the above makes murder justifiable. You can say YHWH was protecting his people and his image in the process, but what is it worth if you gain the world and lose your soul?
Since God does not contradict Himself and God does not lie, God cannot lie. God says, “Thou shalt not lie.†How do you answer someone that says to you, God also says, “Thou shalt not kill.†And yet, God sometimes kills.
Answer
Now the word in the Hebrew, in Exodus 20, which is used for “Thou shalt not kill,.†is “Thou shalt not murder,†and the assumption in the term is that it is an illicit murder; that it is an unjust killing. Okay?
The question is a difficult question if you push it to its limit, because the truth of the matter is everybody who lives, lives because God gave them life and everybody who dies, dies because God is in control of who lives and who dies and when they die. So ultimately everybody who dies, dies because God has allowed a death principle, but the point of Exodus 20 is murder as a crime. God never kills in an iniquitous way. God never kills as a crime. The only time God takes a life would be as a righteous act. Always as a righteous act. A righteous act for His own glory one way or another. It could be that that righteous act was a righteous act on behalf of one of His redeemed saints, that He wanted to bring into His own presence. It could be that that righteous act was an act of judgment upon evil, but always when God takes a life it is a righteous act, and so we start with the character of God. Basically the Old Testament in total is designed to communicate to us the character of God: God is Holy, Holy, Holy. Therefore, if God takes a life, it is a Holy act. God does not murder. God does not indiscriminately and unjustly and iniquitously take life. The truth of the matter is, looking at it this way, if God killed instantaneously every person on the earth it would be an act of righteousness. Because every person on the earth is a sinner and the wages of sin is what? Death. So it is mercy that any of us are spared--and grace.
http://www.biblebb.com/files/macqa/85-1-5.htm
We all deserve hell because God is Holy and just and we are all guilty before Him. This is what God's justice requires, perfect obedience. But He is also a merciful God who has provided a way in His Son Jesus Christ for those who have faith in Him.
Nobody is predestined to hell. They are simply left to their own fallen natures.
Hebrews 5:14 But solid food belongs to those who are of full age, that is, those who by reason of use have their senses exercised to discern both good and evil.
Some of you are not yet ready for this discussion. If you are looking for an excuse not to believe, God will not show you the truth.