Hashirama is at a level that he shouldnt fall for genjutsus. Just an opinion, dont freak out.
Apparently there is a level where genjutsus become useless. Huh, go figure.
It is an opinion, but one that is wrong. No one except for Bee or whoever weilds Samehada can even know automatically that genjutsu is being used, otherwise there is no way to know you are in a genjutsu unless weird stuff starts happening.
So if a genjutsu were used to make Hashirama think that Madara had died, then that wouldn't be weird or unnatural because they were battling.
This is why genjutsu is so powerful, but most people on the base don't understand that, they just say "Oh he can break out of genjutsu". They don't understand that the victim has to first be aware of the fact that they are in a genjutsu, before they have any chance of breaking it.
Next you have to have the skill necessary to break it, and it makes sense that the more powerful or higher level the genjutsu, the more skill it requires to break it.
Anyway I don't want to go into a huge speel about how genjutsu is the most useful ability alongside sealing jutsu, but yeah Hashirama isn't of a high enough level to be immune to genjutsu, no one is.