You are using like/as as a conjunction meaning in the way that, to introduce the subordinate clause "...has happened before".
This is what the Cambridge Dictionary has to say about using like as a conjunction.
In informal contexts, we can use like as a conjunction instead of as. Traditional grammar books consider this use of like incorrect:
Like any good cook book will tell you, don’t let the milk boil. - informal, some would say incorrect
As any good cook book will tell you, don’t let the milk boil. - correct
I would therefore advise against using the two 'like' sentences unless you know the people that you are speaking to and they routinely use 'like' in this way.
Note that, when you introduce a subordinate clause in the middle of a sentence (i.e. not the start or the end), it is normal to enclose the clause in commas. In case you didn't notice, that's exactly what I did in the previous sentence. In your sentence, it would be better to put the clause between a pair of commas. This means adding one more comma after 'Or' in your sentence:
I hope you like the letter i wrote you. Or, as has happened before, you might not.