Use Google's "Find My Device" tool to erase the phone remotely.
Make sure the phone is turned on, and open this link from a computer:
[link|https://www.google.com/android/find|https://www.google.com/android/find|new_window=true]
Sign in to the tool with the Google credentials you used when you first set up the phone. Choose the phone on the list, and click ERASE DEVICE. This will erase the phone and allow you to enter a new PIN.