Then connect bootable pendrive & it's showing repairing windows then freeze on loading then machine check exception error
You get an MCE error with just the usb attached? you shouldn't unless the actual USB itself is causing it, as if SSD isn't attached, there is no windows there to cause the error?
If the USB is only thing running, there is no windows there to repair, why is it going into that mode.
Did you reconnect the ssd as that sounds like its trying to boot the ssd.
Did you use the boot override menu in bios to boot off the USB? its on page 36 here -
https://download.gigabyte.com/FileList/Manual/mb_manual_h310m-s2_e.pdf
its on the Save & Exit screen
what you do is boot pc with usb in slot
go into bios and leave the normal boot order alone
go to save & exit screen
choose boot over ride
choose usb from list, PC will restart and boot from installer.
you shouldn't get an MCE on installer I don't think... i mean, its possible but i don't know, never seen it. It shouldn't run windows repair, it will just try to install.
As I said, could be ssd, if you have a spare hdd I would try to install on it and see if you still get the errors.