He isn't stupid, as some believe, he's only incredibly stupid in some ways. As you suggest "I think he to some extent realizes it, but tells himself it'll go away... " i agree, he must realize he says some very dumb things. Maybe he thinks, a bit, that it's worked for him so far why would it not always work in the future.
Got a hunch he might be feeling a bit desperate, and because he's never much doubted himself before doesn't know how to handle it. And he has just said whatever has come into his head for so long...
Dunno, but one thing has to be certain, Trump is losing it to say what he said there, to paraphrase some - 'Just one incredibly violent day by the police, and it will all go away.' - meaning of course that those who commit violence, break the law, whatever, will see if they don't behave they will be beaten by the police. Then it will all go away, then we will have solved the problem. Except of course it has never worked in the past.
And it isn't working for Netanyahu. In the long run it has never worked for anyone who thought violence was the best way of dealing with violence. You know, 'doing the same thing over and over though it's never worked before, is one definition of insanity. There is no doubt Trump exhibits more insanity than most.
Trump is not mentally stable enough to be president again. Responsible people tried to mold him before and it worked some. He didn't bomb Iran. Still...