In poker? Yes it is.
Casino game? Stupidity at its peak.
No one should go all in on a casino game like fed-up with something and decided to spend their entire balance (decent to big amount) then it's not going to change the fate of us and we are decreasing our chances of winning with all in because mathematically you got more chances to win if you bet more times so be sensible and don't bet in a rush.