What it is doing has something to do with port 0 I think. If I move my finger on and off that wire on the breadboard at that pin the LED fades from on to off so that's why I think it's now hardware.
for sure it's an hardware problem. Can be solved easy. Place resistors (1-10K) between all input pins and ground. This is happen because your pin is floating and sensitive to all voltage/current variant from your body/environement.

this will work. Unused pin must be tie to ground or VDD to avoid other problem(be sure to set TRIS to input). It happen to me few time to blow a PIC when testing in automotive noisy environement.

regards