In Kant we find  a kind of "apperception" perception that sees oneself . From this we know the unity of consciousness. It is the same faculty of synthesis by which we know universals {synthetic a priori.}  This forms the basis of the transcendental deduction. (note 1) So now we can understand the Rambam about knowing God, who is the thing in itself, the ding an sich. That is knowing God is a kind of knowing that we know things in themselves. That is why it is called knowing. It is the faculty by which we know unconditioned realities.

Let's call this apperception. It can't be the thing which recognizes universals as we know the Rambam holds God has no universals. So it is the kind of knowledge by which we know our inner self. And that implies a strong connection. We have more than an emotional connection with ourselves; we are ourselves. So this connection with God is more than an emotional connection. It means a kind of oneness with God, as if we and God were one.

[I know I am borrowing from Schopenhauer. ]

In any case what we have here is good use of the faculty that Kant says gives us direct knowledge of the existence of the ding an sich, but not its characteristics. So when Maimonides tells us we can know that God exists he can be understood in this Kantian type of way.

And this resolves a conflict about Maimonides. There are people that think the Rambam limited reason. {"Rather in the Guide and elsewhere in his ethical writings, Maimonides goes to great pains to deny that human beings have any innate metaphysical, and especially, moral intuitions." Mark R. Sunwall.} There are others who pointed out the proofs of God's existence as showing that the Rambam did not limit reason. Well as far as God's existence is concerned we can use Kant's idea of a perception to show he did think reason puts us in direct contact with the ding an sich.

When I saw in the Rambam this remarkable statement לא הצם והמתפלל הוא הנרצה אלא היודעו I was struck with it power. {It is not the one who prays and fasts who is desirable to God but rather the one that knows God.}

To understand this statement I think one needs the anonymous commentary on the first four chapters of the Rambam's משנה תורה Mishne Torah. He asks one verse says do the mizvot in order to love and fear God. Another one says love and fear God in order to do the mitzvot. This is a contradiction. Answer: There are two kinds of Love and Fear. For example there is fear of God's punishment and there is awe of God's greatness. So one verse tells us to have the  lower love and fear in order to do the mitzvot and the other verse tells us do the mitzvot in order to come to the higher love and fear.
Thu the mitzvot have a purpose. They are not the goals in themselves. And the purpose is this kind of love and fear.
So it seems to me that what we  call דביקות "devekut" [attachment with God] is at least some component of what The Torah requires of us.

(note 1) Synthesis is required to explain the mineness and togetherness of one’s mental states, and by linking synthesis to the application of the categories, Kant argues we could not have the experience of the mineness and togetherness of our mental states without applying the categories. Internet Encyclopedia of Philosophy