It kind of answers the question, I suppose. The sticking point is that since you already have a domain2, one assumes that it has email accounts on it, and that you'd want to be using those not email accounts counfigured for domain1.
Anyway, yes, you can do what you want, sort of, maybe.
If you delete domain2 completely, you can then "rename" domain1 to domain2. To do this, open domain1 in the control panel, click on Websites & Domains tab, click on Show Advanced Options, and select Website scripting and security.
In the general tab you'll see the Domain name box, where it will show domain1. Just change that to domain2.
/var/www/vhosts/domain1 then gets automatically renamed to domain2. Contents remain the same. Passwords remain the same. Usernames remain the same. Email accounts become whatever@domain2 with their original passwords and mailbox contents. DNS settings gets changed to domain2. Basically this does what you need as far as I can tell.
I'm not completely sure whether it matters if you change the hostname before or after doing this. The problem is that if the hostname does not resolve on the server you can experience big problems. Maybe you should change the hostname to domain3 (or something), make sure all is well with everything, then do all these domain deletings and changes and renames and so on. Then, with domain2 firmly in place and DNS correct and resolving etc etc, change hostname again to domain2.
WARNING: This is a big change to make. I strongly suggest you create tesdomain1, add some email accounts. Send it some email. Upload a website. Then rename it to testdomain2 as outlined above. Does everything change correctly and in the way you expected? If yes, then great. If no, then see what has gone wrong and be prepared for the same thing to happen when you do it on the real domain1.
I'd also strongly recommend you backup everything before making the big change.