I have experienced microcontrollers freezing and malfunctioning due to hardware issues, but they were mostly dsPICs. However, the same principles should apply.
Make sure the power lines are properly regulated, filtered and decoupled.
'Isolate' the reset/master clear pin from the +V line using a diode, and connect a decoupling capacitor and, if necessary, a "bulk" capacitor as well from the reset/master clear pin to ground.
Keep your connections from the oscillator to the PIC short. Select appropriate capacitors to use from the oscillator pins to ground.
Hope this helps.
Tahmid.