iMessages on Mac consistently disappearing
In the messages prefs, under the messages tab do you have the "save history when conversations are closed" checked or not?

I generally don't close my conversations so I haven't lost any of my messages but if you regularly close them then this might be the option to check, if you haven't already done so.

Also if you have your main (Apple ID) account listed at the top of all your accounts, and make sure that you have your mobile number listed as the "start new conversations from:" section this, hopefully should solve your problems.

I use messages for iMessage and for Facebook chat but it is also set up for gmail...

Hope that helps