Assuming you're using IMAP/SMTP, these emails aren't on the Mac anyway. So space isn't the real issue.
The problem is the absurd number of emails the OS and email client have to try and display in its lists. That means every bit of available RAM is being clobbered, and is very likely spilling over to a large block of virtual RAM on the drive.
I once activated all 38,000 fonts I have just because to see what would happen. Not surprisingly, the Mac slowed down a bit, but apps with font lists became nearly unusable. Particularly if I tried to select anything in the font list. I can't imagine what nearly half a million entries would do to performance.
You'd have to have a monster of a computer to reasonably handle a list like that. As in, at least 128GB of RAM and the fastest CPU you can get. Basically, a gaming PC with a $500 video card, a minimum 1 TB SSD to handle virtual RAM, a seriously overclocked CPU and as much RAM as the board will let you install. Or said another way, a very overpriced email terminal.
What I would do is get those emails onto a completely different server where they are converted to regular files and are searchable through a front end via a web browser so the server is doing the work instead of a greatly overworked email client on your end. Once built and tested, clear out the email server. Either that, or someone has to determine how many of those emails even need to be there anymore and delete as many as possible. Or, at least archive up to 80% of the oldest ones. I can't imagine anyone looks at anything more than a couple of year old very often.