Increase in Potential Energy When Bonds Are Broken
First, changing a solid into a liquid does not involve breaking bonds in the normal sense of the word, i.e. covalent bonds. Mostly intermolecular interactions are broken as heat is put in to melt something. These may be hydrogen bonds e.g. water, $\pi-\pi$ interaction e.g. benzene or dispersion as in cyclohexane and similar non polar but (slightly) polarisable molecules.

Starting with free atoms, when these are brought together and a molecule is formed then energy is released to the surroundings and a stable molecule is formed, say, H$_2$, or HCl etc. The figure shows the potential energy plotted vs atom separation. The energy is zero when the atoms are separated at infinity; in reality about 10 bond lengths is equivalent to infinity.



To dissociate the molecules, potential energy has to be added as shown by the dissociation energy. Any energy above this is released as kinetic energy of the atoms.

The heats of formation of different types of molecules have a wide range of values. Ignoring vibrational energy, which is small compared to bond enthalpy, this is in effect moving from the total minima in the potential wells of reactants (of the whole molecule not just a bond) to the minima in the products. This may involve absorption or release of heat to the surroundings and so may involve gain or release of potential energy overall. It just depends what the reaction is. (In calculating the Free energy changes entropy changes have to be considered also.)