Buy a UPS(uninterruptable power supply). It will recieve the 'power fluctuation' and store a small amount of energy in its battery. It will also regulate the varying voltage that is getting to your place. You plug the UPS into your wall outlet and plug the cpu into the UPS.

But you also need a new power supply in your computer. It should regulate the voltage and current on its own and has probably gone bad. That would be the immediate cause of your motherboard(s) burning out.