This could be a Hardware issue. However, let do a quick reset and see how this works out:
Go to Settings
Select Apps
Select All (Look for ALL on top menu or swipe to the right to get to ALL)
Select Google Services Framework and tap Clear Data.
Turn off (shut down) your device and turn it back on.
Test the phone to see if it will black out again.
Hardware issue:get new [http://www.witrigs.com/replacement-parts-navigation-button-power-button-volume-button-for-samsung-galaxy-s3-grey|here]
Does the phone have any physical damages?