Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him).
How do I go about secluding myself for the purpose of worship (making khalwah)?
Any time in which you are alone focusing on Allah is a type of khalwah. At that time you should recite the Qur’an or adhkar which have been transmitted. The purpose of khalwah is focusing oneself on Allah, being present with Him and purifying your heart. The most beneficial dhikr for the majority of Muslims and those at the beginning of the path is la ilaha ill’Allah. The utmost benefit in times of seclusion is obtained through the permission and observation of your shaykh and through his giving you adhkar which are appropriate to you.