Disconnecting your personal iCloud account on your device is absolutely necessary before shipping your device. You can still do it via icloud.com even if your device doesn't work and/or is no longer with you!
Make sure you have made a complete backup of your device before following this step-by-step guide.