I have "On My Mac" on the side too. As far as I know its function is to remove emails from your POP/IMAP email accounts' servers and to instead store them locally on your mac so that your email accounts' servers don't hit their storage limits. In the past I have deleted email accounts and the item inside "On My Mac" have not changed. That being said, it is always a good idea to have an updated backup of your system (e.s. using Time Machine).