Sony provides official software to repair and update Xperia devices. This method "reinstalls" the software, which removes the lock screen pattern.
Before attempting to bypass the lock screen pattern: Bypass Lock Screen Pattern on SONY Xperia S LT26i
If Method 1 fails, you can use Sony's official tool to repair the software, which will remove the lock but erase all internal data. Sony provides official software to repair and update