Sadly I think you are mistaken to paint it as an irrational Israel lashing out - that's too generous.
I think it's quite the opposite - there has been a very clear, cold, calculated strategy - which is to use the conflict as an cover for doing what some in the government have always wanted to do ( and been quite open about it ) - which is to create a greater Israel - drive out all Palestinians from the river to the sea ( Gaza and West Bank ), as well as push to the river in the north into Lebanon and take more of Syria.
Those in government understand the potential reputation loss - but see that as temporary and something that can be managed under the protection of the US, while viewing the gain of territory as permanent.
I think it's quite the opposite - there has been a very clear, cold, calculated strategy - which is to use the conflict as an cover for doing what some in the government have always wanted to do ( and been quite open about it ) - which is to create a greater Israel - drive out all Palestinians from the river to the sea ( Gaza and West Bank ), as well as push to the river in the north into Lebanon and take more of Syria.
Those in government understand the potential reputation loss - but see that as temporary and something that can be managed under the protection of the US, while viewing the gain of territory as permanent.