  We adopt a 'thermodynamical' formulation of Mach's principle that the rest
mass of a particle in the Universe is a measure of its long-range collective
interactions with all other particles inside the horizon. We consider all
particles in the Universe as a 'gravitationally entangled' statistical ensemble
and apply the approach of classical statistical mechanics to it. It is shown
that both the Schrodinger equation and the Planck constant can be derived
within this Machian model of the universe. The appearance of probabilities,
complex wave functions, and quantization conditions is related to the
discreetness and finiteness of the Machian ensemble.
