The more you do what He commanded you and stay away from what He forbade uniform doing, the closer you would be to Him.
Indeed, one must always think positive of Allah and know that He is the All-Doer and All-Knower and that everything comes from Him and only happens because He planned it so. We must be grateful by any means and will get rewarded for our patience eventually. We must always seek Forgiveness from our sins by doing loads of dhikr and dua.