As I walked through the channel — I knew it was over. Is this a correct usage of the em dash?
No. You can use a dash to connect two clauses that aren't complete sentences, but in this case where the second clause flows naturally from the first one, you would be better served using a comma. Dashes are usually used to indicate a change in tone or direction (often to a facetious or informal one).
After three weeks on set, the cast was fed up with his direction — or, rather, lack of direction.
If you're using a dash instead of a comma because you feel that a comma wouldn't give the second clause enough weight, you'll probably need to change your wording. Something like this could work:
As I walked through the channel, I realized I had to give up. It was over.