Your search on zero crossing should have yielded circuits based on voltage comparators where the reference is zero. That gives you a square wave of the same frequency and in sync, except for a small delay dependent on the comparator. How close to sync do you need? John