Were you riding it a typical, ventilated bicycle helmet? If so, there's your problem. I keep my Bolle The One with the aero covers clipped in specifically for rainy days. A helmet that water can't go straight through makes a huge difference.
You can get a dedicated rain cover for your helmet, or just stretch a showercap over it.
__________________