This only applies if you have a first generation Apple TV. Also I hope you have a router and are not connecting the ATV directly to the iMac.
Usually I sync my First Generation Apple TV wirelessly, but sometimes I'll have some huge media files I want to sync on it which can take a long time. In those cases all you do is connect your Apple TV via ethernet cable to the same router your iMac is connected to. Don't worry about it not being connected to a tv because all you are going to do is SYNC your Apple TV. If you do not see your Apple TV in iTunes, turn off the Apple TV, and quit iTunes. Then turn on the Apple TV first, wait a minute and then start iTunes. Once iTunes sees the Apple TV, manage your content, then sync it.
Once the Apple TV has completed its sync, quit iTunes. Unplug your Apple TV, and then put the device back by the TV you want to enjoy the content on.
I have done such a thing a few times and it works flawlessly.