When I remove the side cover of my Dell Optiplex gx620 & install it in an open window I have no problem with blue screen errors. Once I put the cover back on the hard drive heats up and I soon get the "Windows has shut down to protect... etc. Is there any additional cooling that is available internally? It is the small forn tower with little room in it and yes the cpu fan does work but speeds up & slows down.
It looks to be a BTX form factor with no case fan, just a PSU with a fan and a CPU fan. Start with cleaning out the dust from the whole system with compressed air and see if that helps. If not then go with with das stig suggested and mount a high airflow 120mm fan in the side panel as an intake.