The prophet is writing after the Babylonian captivity, when the chosen people had found themselves in exile under foreign domination. Some were tempted to abandon their faith in God and their concept of themselves as related to and loved by Him. The prophet promises that a true knowledge of God and His presence with His people removes all self-doubt and self-depreciation.
This "cloud" often accompanies an appearance of God to His people, as conceived in the Old Testament and even in the New (see, e.g., Matt. 17:5) — God in His utter holiness and power perceived as present, but inevitably hidden from human sight.
The New English Bible (NEB) brings out the meaning clearly: "Am I a god only near at hand, not far away?"