Iran could practice real politik and restore diplomatic relations leading to full renormalization with Israel and be quite better off. Iran was the second Muslim nation to recognize Israel. Israel could be an ad hoc, positive security element for Iranians concerned about Sunni state threats to its security, and paradoxically serve the same role regarding Sunni concerns. Shia and Sunni governments of the Middle East have more dangers from within and from other Muslim states than otherwise.
Muslim nations have problems with concentrated wealth and power that drive strong fundamentalist morally right wing populism to work with terrorism against conservative and even royal governments. Israel is a popular scapegoat for historical reasons. In the present era that dynamic is not very useful for the lawful regional governments nor for the people or Israel. Plainly the Syrian civil war should have been avoided along with the loss of life and suffering however the political way of being in the region tends toward organized extremism with support from international actors. Iran could take a low cost and pragmatic direct action of just restoring full and normal diplomacy with Israel and moving on toward bringing its own civil economic and security concerns to the front of its agenda. The practical is too often the last political item of possible choices to be enacted.