The electronic structure of magnetic lanthanide atoms is fascinating from a fundamental perspective. They have electrons in a submerged open 4f shell lying beneath a filled 6s shell with strong relativistic correlations leading to a large magnetic moment and large electronic orbital angular momentum. This large angular momentum leads to strong anisotropies, i. e. orientation dependencies, in their mutual interactions. The long-ranged molecular anisotropies are crucial for proposals to use ultracold lanthanide atoms in spin-based quantum computers, the realization of exotic states in correlated matter, and the simulation of orbitronics found in magnetic technologies. Short-ranged interactions and bond formation among these atomic species have thus far not been well characterized. Efficient relativistic computations are required. Here, for the first time we theoretically determine the electronic and ro-vibrational states of heavy homonuclear lanthanide Er-2 and Tm-2 molecules by applying state-of-the-art relativistic methods. In spite of the complexity of their internal structure, we were able to obtain reliable spin-orbit and correlation-induced splittings between the 91 Er-2 and 36 Tm-2 electronic potentials dissociating to two ground-state atoms. A tensor analysis allows us to expand the potentials between the atoms in terms of a sum of seven spin-spin tensor operators simplifying future research. The strengths of the tensor operators as functions of atom separation are presented and relationships among the strengths, derived from the dispersive long-range interactions, are explained. Finally, low-lying spectroscopically relevant ro-vibrational energy levels are computed with coupled-channels calculations and analyzed.