In Tzavaas HaRivash, it is brought in the name of the Baal Shem Tov that there are three main things that bring a person to d’veikus: due to seclusion from people, because of writing secrets of the Torah, and through performing the Yichudim of the Ari z’l; and at the time these Yichudim are done to think at that time of the greatness of Hashem according to your ability.
One thing we can take out from here is that we shouldn’t be afraid of the Yichudim of the Ari z’l, since the Baal Shem intended his Torah for simple people. So long as the names aren’t said, there’s no issur done, nor any other problem so long as one concentrates properly.
The thing that sticks out the most is the idea that d’veikus is accomplished through writing רזי תורה, (Secrets of Torah). We would think naturally that this is a consequence of already attaining d’veikus rather than something that leads to this state. To understand this better, we have to look in the Tanna D’Vei Eliyahu. There are two different shtiklech that are interesting, b’kitzur, we learn there that everyone who learns Torah gains illumination according to how much they learn, with or without much understanding in one part. The other shtikl teaches us that it is an obligation for every בן ישראל to write chiddushim (novel Torah insights) as often as possible. In conjunction with these ideas, there’s also the concept that every Yid has a letter in the Torah. So whenever you come up with a great chiddush in learning and you come to write it down, this can be said to be in the category of secrets of Torah, since it is a revelation of some new aspect of the letter your neshomo is connected to. It’s important to learn as much as possible בבקיאות (swiftly, with goal to gain a breadth of knowledge) in order to draw down great amounts of divine light into your body and soul. When these secrets are written down, this revelation of Divinity on whatever level brings a Yid much closer to Hashem, ultimately leading to true d’veikus.