If you happen to have a spare mouse on hand.
What you can do to make sure that the mouse is putting out a signal to your iMac is:
1. Turn off the mouse.
2. With the additional mouse if you have one, go to Apple Logo in the top right corner then System Preferences -> Bluetooth.
3. From here, make sure the mouse has good, charged, batteries in it.
4. Power on the mouse.
5. You should be able to view the mouse at this point. Select the Mouse you would wish to connect and you should be able to view your cursor again.
If you only have a keyboard working. You may be able to use the spotlight command by clicking the "Space Bar" + "Command Key" at the same time. type in Bluetooth and hit enter. It should pull up the Bluetooth menu and you will have to attempt to navigate it with the Arrow Keys on your keyboard.
If you are still having issues with the mouse, it maybe time for a new one.
Let me know if this helped!