Disconnecting your personal iCloud account on your device is absolutely necessary before repair work can happen, to be taken back or resold. 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.