Short Answer: "Why are you talking crazy like that? Have you fallen on your head or something?" is the minimal change I would make to make this more grammatical/natural. (The metaphorical "question" is whether or not the person recently fell on their head because they are "talking nonsense".)
I'm guessing that "talking like mad... fall on your head?" is an idiom in the OP's native language, and while it may not be common to say that in OP's language, it's probably not "rare" either.
A literal translation, while it could be understood, is not used in native English. When someone is talking nutty/upset/angry/irrationally, we don't figuratively/rhetorically accuse them of having fallen on their head. In fact, "Have you fallen on your head or something?" could likely be very insulting.
My concern is that giving you some type of "corresponding phrase" would likely be incorrect since the American culture doesn't have any standard catch phrase to be used in this situation. I think the issue here is not language difference by culture difference.
We might say things like "Come on now... you don't mean that" or if they are talking about doing something unethical perhaps "It's not worth it." It all depends if you have some particular scenario in mind. If you wanted a more confrontational tone perhaps, "Don't be stupid" or "Don't be an idiot" would be similar. But that might be much stronger and taken more insulting than a well known idiom from your native language.
In your culture, people understand you're saying something like, "You're too upset and what you're saying is not good. Listen to yourself and be rational." Perhaps that would be the closest parallel English sentence. Any time you are trying to translate an idiom, the easiest method is a straightforward expression of the meaning you are trying to convey. This may require you to think carefully about what your native language idiom really means including nuances and how they receive it.