It's definitely not good for their long term interests, but it's not as insane as it looks.
Israel's problem is that their own social cohesion is falling apart. There are 3 or 4 factions in Israel and the situation is threatening to devolve into a civil war.
So Netanyahu is basically doing the old "start a war to distract from problems at home" gambit. It's bad for foreign relations, but it's being done against a backdrop of "we might not have a country much longer"... Kind of "go big or go broke" move.
