Sign out of messages on Mac (iMessage)
You can sign out of the Messages app on OS X as follows:


https://support.apple.com/kb/PH22359


If you can't access the Mac, then changing your iCloud password or evoking the application specific password for FaceTime and messages would suffice but also be more work for you. 


https://support.apple.com/en-us/HT204397
https://appleid.apple.com