It sounds to me, like there is something in your current power plan settings that is both preventing your computer from shutting down completely, as well as producing a Blue Screen upon its' attempting to recover from an energy saving state.
You might investigate by first configuring all you advance power plan settings for high performance and preventing things like hibernation as well as anything related to hybrid sleep.
After which you can then attempt to re-instate some of the power saving features and see if you can determine which of them may be responsible for your problem.
Additionally.....
Make sure you have all your drivers updated from the computer manufacturer to support your installed hardware (BIOS, Chipset, Storage Controllers, Video, Audio, Network, etc.,)