I have a wireless Apple bluetooth mouse on my iMac. I have periodically lost access to the mouse for various reasons, such as when the batteries die. (This happens too often, since I usually use my laptop and the desktop sits and sleeps for long periods. Turning the mouse off manually is a pain as I have to let it pair before doing anything). I usually have a wired mouse connected or nearby for such cases, but I found a neater and quicker solution in the Universal Access preference pane in the System Preferences. Under the Mouse or Mouse and Trackpad tab, the first item listed is "Mouse Keys". This needs to be turned on of course, but I prefer not to have this enabled all the time.
The trick here is to check the next box, "Press the option key five times to turn Mouse keys on or off".
With this enabled, the next time you lose mouse connectivity, you just have to press the option key five times to enable the mouse keys, then control the cursor using your number-key pad. Mouse clicks are with the 5, click and hold with the 0, release click and hold with the 5.
[kirkmc adds: If you do use a wireless mouse, make sure to use rechargeable batteries; it's a waste to use throw-away batteries.]
Mac OS X Hints