You are on the brink of either worse or "clear blue yonder", and wisely ask for advice before digging a bigger hole.
Do not confuse formatting with restoring,
Formatting will wipe a drive of absolutely everything. It has its uses, but is a last resort!
I'm sure you can leave drive D: alone for the present, but what is on the 3rd partition?
It may be the computer manufacturer's recovery drive.
There are variations on System Restore available, and that my be your best course, but I leave it to others to find a way out for you.