Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
When you enter incorrect pattern for multiple times, it should ask for the Gmail account or backup PIN associated with it. So use that Gmail account or backup PIN to reset the code. On some models, it will not ask for Gmail to reset.
If that didn't work, then the only option to get in to the phone is factory-reset it. Believe me, there is no other way to override the lock if the Gmail or backup pin option didn't work. Factory reset will erase everything from it and return it to new (like Out of Box). This is how they designed the phone. If you want to get access to your phone again then follow the steps below to factory reset it;
Turn off the phone
Press and hold down Volume Up + Home + Power buttons at the same time for a few seconds.
Android system recovery will be loaded now
Select wipe data/factory reset. (Volume buttons to go up or down, select with Power button)
Select Yes — delete all user data.
Then select reboot system now
That should factory reset the phone . Please let me know if that didn't work, so we can continue troubleshooting.