I don't see why you would need to close your bank account before you leave. It is possible to have a bank account in Dubai (but not a cheque book) if you are not resident.
I would suggest you keep your account open (but cancel your credit cards so you can get a no liability letter), pay the cheque in, then pop around to Al Rostamani (or other currency exchange) and write them a cheque for the transfer. Once that has cleared, close the HSBC account.
After over 10 years my provident fund is worth over 1 Million Dhs- no way do I want to carry that much cash around.