The issue is exactly the fact that you've added a domain on the system that is the same as your hostname. You cannot use a hostname that needs to also be a domain on the machine for an account. Change the hostname to something like server.mydomain.com instead in WHM > Change Hostname area, then run /scripts/updateuserdomains to get the domain working for ownership.
Again, the hostname cannot be the exact same as mydomain.com because the hostname is owned by the user nobody under cPanel, which means that an account user cannot then own it. If you change to server.mydomain.com, which will then be owned by nobody, then mydomain.com will be able to work for email.
You can see before and after changing the hostname who owns the domain to see that there is an ownership issue by running this command:
Of course, replace mydomain.com in each of the above examples with the actual domain name. The whoowns script tells you what user owns a set domain.