How stupid!

Literal

Idiot [resemblance-みたい]!

馬鹿みたい ('like an idiot, idiot-like') is a casual exclamation — みたい attached to a noun means 'like X / X-like.' Here it expresses contempt or disbelief: 'how stupid!' or 'this is absurd!' Could be self-directed (lamenting one's own foolishness) or thrown at the situation. みたい is the casual equivalent of ようだ.