If your iMac still has the dead GPU but can be used in Target Display Mode, then congratulations, you have saved the money needed to fix the GPU.
For iMac 2009 and 2010, by default, the iMac will detect an input video siganl and turn itself to target display mode.
Pressing Command + F2 will actually switch to normal mode.
I've experienced this situation. It even helped in my case, as my iMac 2010 (GPU = WX4150) booted up to High Sierra with a black screen, pluging-in a video feed from my Windows PC via the mDP port and it displayed Windows desktop. Turning off the Windows PC and the iMac displayed High Sierra log-in screen.
I don't quite understand you second question about the Magic Mouse.
Do you expect the Magic Mouse to magically switch to the Mac Mini once you power the Mini up?
Apple Magic Mouse is not that smart.