I familiar that these former iMacs after arrives to showing issues for no conclusion at all. There is no guarantee that just hardware part is causing this issue. Sometimes software is the chief bottleneck in Mac. But for that a major OS update can fix some. Here in your situation it appears similar to a graphics system is maintain suspending. To assure it, you require to go to the console logs for pointers and there you require to read out the complete log. Freezes does not report any type gs there but you could see few kernel panics which too could be the reason.