'Follow God… devote yourselves to Him" (Devarim 13:5). תִדְבָּקֽוּן Tidbakun (devote yourselves) literally means "attach yourselves." A person must do both, to the best of his ability: he must perform the mitzvot and thereby attach himself to God, and he must attach himself to God in all circumstances and devotions (Likutey Halakhot III, p. 230a).
This verb root (דָּבַק) is the same that is used in Genesis 2:24, "Therefore shall a man leave his father and his mother, and shall CLEAVE (attach/devote) unto his wife, and they shall be one flesh." This is the kind of intimacy Hashem wants with us, to be joined/attached as a husband and wife. What does it mean to attach myself to my spouse? It means to seek his pleasure and joy, and to be in unity and harmony with him. I remember times in my marriage when I felt detached to my husband for the most part, getting together minimally only for a few common interests such as to care for our children. Through uniting in the ways of Torah, we have grown closer not only to each other but also to Hashem.