There are multiple places in Chazal where it is written that Pinchas is Eliyahu. For one such example, see Pirkei D'Rebbi Eliezer chapter 46.
In BaMidbar 25:12 it is written:
לכן אמר, הנני נתן לו את בריתי שלום
Therefore say: Behold I give to him my Covenent of Peace.
In Masechet Kiddushin 66b it is written that the Vav of the word Shalom needs to be written in two parts, cut down the middle.
The Ba'al HaTurim says there:
ו' קטיעא כי פנחס הוא אליהו. וכן אליה כתיב חסר ו' ויעקוב מלא ו', שנטל ו' מאליהו למשכון עד שיבא עם המשיח ויגאל את בניו
A cut Vav, for Pinchas is Eliyahu, and Eliyahu is written without a Vav (Eliyah) and Yaakov with a Vav, for he took the Vav from Eliyahu as collateral until he comes with Moshiach to redeem his (Yaakov's) sons.
We see from this Midrash that Yaakov Avinu is holding on to a certain number of Vav's to make sure Eliyahu comes with Moshiach to redeem Am Yisrael.
There are 5 Vav's total that are out of place.
At the end of chapter 3 of Kol HaTor, it is recounted that in 5542 (the beginning of the 2nd hour of the day where 1000 is divided in to 24 parts), the GR"A set out to make Aliyah, to start the work of Kibbutz Galuyot, by himself. While he was on the way, he realized that he had advanced from the level of Yehoshua bin-Nun to the level of Moshe Rabbeinu, whose role is to send his student in to Eretz Yisrael. He then turned back to Vilna, in deep worry regarding the problems that faced the move back to Eretz Yisrael. He fasted for days and using secret methods, managed to attain a revelation of Yaakov Avinu. In this revelation, Yaakov Avinu transferred to him these 5 Vav's that he had taken from Eliyahu. The GR"A then handed this over to someone whose name is equal to Vav 5 times.
(Vav spelled Vav Aleph Vav is 13, 13 * 5 = 65, the Gematria of Hillel, implying Rav Hillel, author of Kol HaTor, who came to Yerushalayim 196 years ago)
Here is a list of the verses that make up the drash on the Vav's:
Yaakov - יעקוב
- Vayikra 26:42
- Yirmiyahu 30:18
- Yirmiyahu 33:26
- Yirmiyahu 46:27
- Yirmiyahu 51:19
Eliyah HaNavi - אליה הנביא
- Melachim 2 1:3
- Melachim 2 1:4
- Melachim 2 1:8
- Melachim 2 1:12
- Malachi 3:23
Notice we have 5 against 5. Four of each are from one sefer of Tanach, and a 5th from a different sefer. They mirror eachother.
Yaakov - יעקוב
- Vayikra speaks of rememberance, a word of Chesed.
- The verses of Yirmiyahu are all words of consolation, Chesed.
Eliyah - אליה
- The verses of Melachim are all verses of Din, punishment for sin.
- The verse from Malachi speaks of the Great and Awesome Day, invoking fear, and indeed this is confirmed in the next and last verse of the sefer.
From here it is not a big jump to arrive at other Kabbalistic concepts, like the idea of seeing the 10 Sefirot as 5 on the Right and 5 on the Left, from the perspective of Da'at (Kabbalistic relativity).