I think that just maybe a bad chip.
If you've replaced the thermal paste, reapplied the CPU cooler, I don't know.
Maybe try the i3 you had again? If It does do the same thing as your i5 did, It was most likely the CPU. If It doesn't I think there maybe a problem with the pins on the mobo? I don't want to jump to things, but It's just something to look out for!