Re: PIC and relè
I think the problem is the reset circuit.
If you look in the datasheet, page 26, you will find the recommended reset circuit.
In you case, because of the diode going to /MCLR, voltage spikes higher than 5V can actually cause a latchup of the PIC. That is because the diode turns off and the /MCLR pin sees a large impedance.
I cannot say anything about the layout; that could be a problem, too.
So just implement the recommended reset circuit, first of all.