#1 is correct.
1. I had never thought he would leave me before yesterday.
I had never thought << == [past perfect for a state or action earlier than "yesterday"]
he would leave me <<== ["would leave" is the future-in-the-past form of "will leave" ]
before yesterday.