Do you just get this error with Divinity 2? There are a few causes for this (like overheating or an inadequate power supply) that would apply to any demanding application (DirectX games or video encoding), or some that would happen in anything (malware, hardware issues).
It sounds like just a problem with Divinity 2, though...
How often does this happen?
Is there anything in particular you are doing in-game when this happens, or does it seem random?
Have you tried lowering the graphics options or resolution?
Checked for updated drivers?
In the NVIDIA Control Panel, manage 3d settings, power management mode, change from adaptive to prefer maximum performance and apply changes.
In Windows Explorer, try browsing to the install folder, right clicking on the program (if you have the Developer's Cut version, Divinity2.exe is the standard version; Divinity2-debug has the Developer Mode cheat window enabled) and running the game as administrator. In the compatibility tab you could also disable desktop composition and try different compatibility modes.