Almost every helmet manufacturer recommends replacing a helemt after any type of impact. Many of them have a crash replacement policy where they will sell you a replacement helmet at a greatly reduced price if you send in your damaged one. Check the website for the manufacturer of your helmet. But as others have said; Yes, replace the helmet.