There are several battles won by Muslim armies where the opponent outnumbers them heavily and yet it is still fought. Some famous ones are the Battle of Badr where the Meccan army fielded "an army three times larger than that of the Muslims", the Battle of Yarmouk where Khalid ibn al-Walid led a defeat of an army possibly ten times the size, and the Battle of al-Qādisiyyah where the Persian army was again, possibly three times larger.
On the other hand, it wasn't always a victory against the odds for the Muslims, as the Battle of Tours, also referred to as Battle of the Palace of the Martyrs, shows.
Since the outcome of a battle is unknown to the generals, and since greater odds usually mean defeat (which is why defeats by much smaller armies are notable) why is it not considered suicidal to engage the larger army? Sometimes it's unavoidable, such as an attack on your home, but not all these battles would meet this standard.
My understanding is that suicide is a great sin, so what makes seemingly unassailable odds any different? Surely a truly great general would know the huge risk.