I think you might be able to recover an old archive - presuming the messages were in it.
This does mean you will lose any new messages since the archive though - and obviously it is dependent on you having an archive.
Sign out of iMessage. Quit Messages.
Open the Finder. Hold down the alt/option key and select Go from the menu and then Library (which only shows when you are holding down alt). A folder window will open. Find the subfolder called Messages and find an old back up that hopefully contains the messages you have lost... Of course this depends on the messages having been on the Mac, and I've just realised they may never have been there...
In that case, this might help: click here