Hi and thanks for using JustAnswer. My name is XXXXX XXXXX I will do whatever I can to help answer your questions.
Which carrier did the device come from?
Unfortunately you will have to perform a factory reset of the device. This is the ONLY way to get access to the phone again.
As long as you have a Google account synced to your device, your contacts, calendar, etc. will be re-synced to the device after you run the initial setup again and can log back in using that same account(also the data must have been synced previously).
As far as any data that is stored on the SD Card(images, music, etc.), it will not be erased. Only the phones internal memory is formatted.To complete a Factory Reset follow these directions: