How can I delete all mail from gmail stored on my Android device? There seems to be quite a lot of similar questions but I haven't found one which covers my situation.

I have an android device on loan to do some development testing and at some point I opened the standard Mail account and connected to my Gmail account.
Obviously all my mail was synced.

Now I need to return the device and I have set Aeroplane mode to avoid any further access to my WiFi.

However, when I run the Mail app all my previously synced emails are there, obviously stored somewhere on the device.

I need a way of deleting all those emails from the device only.
Maybe deleting a file somewhere on the device or something else ?
Gmail account is directly linked to the internet and stores few bits of data onto the device. Even if you are not connected to the internet, the data will stay on your device. Logging out of the Google device will remove your preferences or settings, but the data can on your device is still visible. To remove the data, you need to do a factory reset, which will wipe out the entire data (including your internal memory file). 
This can be done in two ways, reboot from settings, Settings --> system or about phone --> reset --> factory reset. 
Or manually by switching off the phone, and then pressing power and volume down button simultaneously. You can find more information here https://www.androidcentral.com/how-factory-reset-android-phone