Answer:
Praise be to Allah, the Lord of the World; and blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
You should not be confused about this matter. In fact, whenever the predestinated time of the death of a person comes, Allah causes that death the way He predestinated. For instance, if a person dies by stabbing this means Allah has predestinated that the death of that person be with a knife or a sword. The same thing is true with the person who commits suicide and the one who dies by a heart attack. Indeed everything for Allah is in due proportion and every act is predestinated to happen at a fixed time. There is a term appointed to everybody's life. When this term comes they can not delay it nor can they advance it. This term is known to Allah before creating the person himself. Allah decides that such person will die by suicide, such will die by an aggression from another person and such will die while sleeping in his bed. As a result if the aggressor makes up his mind to kill a person, then decides not to do so, this means that the term of the person supposedly killed had not come yet or that his term will be through other means. On the other hand, if the person does what usually is deadly and does not die this means that his term has not come yet.
Allah knows best.