By means of spin- and angle-resolved photoelectron spectroscopy we studied the spin structure of thin films of the topological insulator Bi$_2$Se$_3$ grown on InP(111). For thicknesses below six quintuple layers the spin-polarized metallic topological surface states interact with each other via quantum tunneling and a gap opens. Our measurements show that the resulting surface states can be described by massive Dirac cones which are split in a Rashba-like manner due to the substrate induced inversion asymmetry. The inner and the outer Rashba branches have distinct localization in the top and the bottom part of the film, whereas the band apices are delocalized throughout the entire film. Supported by ab initio calculations, our observations help in the understanding of the evolution of the surface states at the topological phase transition and provide the groundwork for the realization of two-dimensional spintronic devices based on topological semiconductors.