Light Hidden in Darkness
Emunah & bitachonTefillah
Darkness and evil exist only so that light and good can be recognized against them, and when good is hidden inside darkness it must be refined and brought to the surface. In the same way, when foreign thoughts interrupt a person's davening, he should know that a great light is hidden even in them, for no place is empty of Hashem. If he strengthens himself in that faith, the darkness falls away and only the good remains. The Degel adds that the word teivah means both ark and word, so the instruction to make an opening for the ark teaches us to make our words shine and to look right beside a closed word to find its opening.
Source: Degel Machaneh Ephraim (on the opening of the ark; citing Sanhedrin 38b and Rav Yaakov Yosef of Polnoye in the name of the Baal Shem Tov)