If your mobile phone screen is broken and want to erase the data before giving to repair or for replacement.
You can try following methods to erase data from the device.
If you ever registered a Gmail address on your google play account to download apps, your phone will be registered in Google's Device Manager on play.google.com. If your phone is connected to internet by WiFi or mobile data, then following method will` work.
1. Go to play.google.com from your computer.
2. Log in to your google account.
3. Click the 'gear' symbol in the top right hand corner of the screen.
4. Go To Android Device Manager.
5. Select your mobile phone from the menu of your registered devices.
6. Select 'Erase' from the list and it will wipe out the data from your phone.
Alternatively, connect the phone to a PC using the micro-usb or charger that came with the phone and reset your device.