I've set it up exactly how it's meant to be done, as per these instuctions using IMAP, however, whenever I setup auto retrieval, my phone then proceeds to download ALL my gmail emails which takes forever and causes the phone to crash. It's imposible, and all me emails when downloaded (over 9000+) cause memory full warnings to appear and also don't appear in their original chornological order.

It's extremely frustrating, it used to work on my N95 a treat. However now I have to use manually retrieve my emails instead.

Unfortunately Nokia seem to have broken this functionality, like you I had it working fine on my E90 until they released a firmware update which made it the same as the 5800 is now. Now on either phone if I set automatic retrieval it will try to download every mail on the server until it's too many and the whole thing crashes. Using auto-notify partially works as it lets you know when the mail comes in however unlike auto-retrieval the mail client will not reconnect itself if the phone goes out of range, is switched off or loses the connection the mailbox.

I've yet to try the v21 firmware but I really wish you could have an imap connection where it simply downloaded new mail.