(This just happened to me, so in case it happens to you, I leave this here.)
Let’s assume you unpaired your Apple magic mouse/wireless mouse and you have no USB mouse, but you do have a keyboard that talks to your computer.
Go to your preferred Terminal application. If you’re not there already, press SHIFT-CMD-A to open the Applications folder. Press Tab on your keyboard to go into the Applications window. Start typing the name of your terminal application. Once it’s highlighted, press CMD-O to open the application. And then…
The command line becomes your friend:
open /System/Library/CoreServices/Bluetooth\ Setup\ Assistant.app
That should pop open the Bluetooth Setup Assistant.
Make sure your mouse has power and that it’s turned on. The Setup Assistant should find the mouse. Click “Continue” and the OS will pair with your mouse. Voilà.
If you’ve never used your keyboard to navigate through your system, first, congratulations for somehow making it to this post. Then:
From the mouseless computer, CMD+Space to get to Spotlight, then type Terminal
.
From Terminal, type:
open /System/Library/CoreServices/Bluetooth\ Setup\ Assistant.app
Then connect as above. This will work for any Bluetooth device recognized by the Apple OS.