For the situation you've outlined, yes, the only way for the two atoms to form a molecule is via the emission of a photon. This is known as 'photoassociation', which isn't very common (although its reverse process, photodissociation, is much more frequent).
In the absence of a radiative energy sink, no associative processes are possible, and this helps to underline a misconception in the way you set up the question:
We collide them with precisely enough energy to form molecular hydrogen (H2).
There is no such energy! If you have two hydrogen atoms, then by definition they have positive energy, but the bound states of the system have negative energy, i.e., they do not have enough energy to form two free hydrogen atoms at infinity. What you've proposed is a scattering process, and unless there's somewhere to put that energy difference, the atoms will retain their initial positive energy, and end up breaking up and remaining as free atoms.
In a real-world cloud of atomic hydrogen, the atoms will quickly associate into diatomic hydrogen molecules, but they rarely do so via the route that you've specified. Instead, in most gases in the laboratory, the crucial process is three-body collisions: these are (obviously) much less frequent than two-body collisions, but they allow for associative processes where two of the atoms join up into a bound molecular state and dump the energy difference into the kinetic energy of the third atom:
$$
\rm H+H+H \to H_2 + fast \ H
$$
(That said, the relative importance of this process depends critically on the density of the gas, and if the gas is too dilute, then this process won't happen. Indeed, you don't necessarily have any guarantee that any association process will happen meaningfully. This is particularly important in cold-atoms BEC work, where many of the experimental conditions are designed to keep associative processes at a minimum (including keeping the cloud very dilute, so that the low density inhibits three-body collisions).)
Now, to dig into the specific questions posed in the current bounty:
The existing answer proposes dissipation through a collision with a third body. Another possible mechanism is electronic excitations. Can either of these occur, depending on temperature and density? Is there data on temperature and density dependence of the reaction rate that would support either or both explanations?
Electronic excitations are indeed an expected feature, but they're a part of the photoassociation mechanism: if the electronic excitation energy is not returned into the nuclear degrees of freedom (which will lead to dissociation), then it needs to be emitted radiatively. There's nowhere else for the energy to go, and there's no chance of the energy getting retained indefinitely in an electronic excitation.
Similarly, there's essentially no way to produce photoassociation (i.e. radiative disposal of the energy excess) other than through electronic excitations $-$ the nuclei just aren't that optically active. Thus, you expect photoassociation to depend sensitively on the energy of the incoming nuclei: if it matches that of an electronic excitation of the bound state (with some considerable leeway, though, since there's a significant energy span of bound states from the rovibrational ground state all the way to threshold) then you expect this resonance to have a higher signal.
From a (brief) look at the literature, I don't get a sense that the photoassociation of hydrogen has been the object of much attention, but it does have some literature dedicated to it (most notably A.P. Mosk, "Photoassociation of Spin-Polarized Hydrogen", Phys. Rev. Lett. 82, 307 (1999), from what I can tell). The reaction
$$
\rm H+H \to H_2 + \it some\rm\text{ form of energy}
\tag 1
$$
is obviously of clear importance to astrophysics, so there's bound to be a huge literature about it, and the array of possible conditions of interest is much too broad for a Physics SE post (particularly once you introduce dust grains that can act as catalysts and as third-bodies that can absorb the extra energy).
As regards actual astrophysical environments, and how the astrophysical literature views the reaction $(1)$, from what I can tell, V. Pirronello et al. offer a good summary ["Formation of Molecular Hydrogen: The Mother of All Molecules: An Experimental Investigation", in Exobiology: Matter, Energy, and Information in the Origin and Evolution of Life in the Universe, J Chela-Flores & F Raulin (eds), Springer, Dordrecht, 1998)]:
The problem of the formation of molecular hydrogen arises from the fact that such simple molecule is not efficiently formed by the direct reaction of two hydrogen atoms colliding in the gas phase. This is a consequence of the fact that the protomolecule, just formed in a high vibrational level, has to release quickly (roughly in a time comparable with its vibrational period) an energy excess of about four and a half electronvolt (or at least a good fraction of it) to became stable. In the gas phase such a proto-molecule is isolated and the only way to achieve this goal is through the emission of a photon; this process is however quite slow because involves roto-vibrational forbidden transitions and the usual unavoidable result is that the two hydrogen atoms restart wondering in the cloud. This mechanism, that is important at the early stages of the universe for the formation of primordial molecular hydrogen, is inside already developed galaxies unable to explain the observed abundances of H$_2$. It was then proposed already decades ago (Gould and Salpeter, 1963; Hollenbach and Salpeter, 1970; Hollenbach, Werner and Salpeter, 1971; Williams, 1968) that a three body reactions (with the third one taking the excess energy) would have been the way to overcome the problem. In the interstellar medium, due to the low densities involved ($n_\mathrm H$ of the order of $10^2 \:\rm cm^{-3}$, in the so called "diffuse clouds"), the third body cannot be another atom, not even H that is the most abundant, but it must be a dust grain.
The series of processes that have to occur are: collision and sticking of two H atoms
with a grain of interstellar dust, mobility of both of them and, upon encounter,
recombination with formation ofH2 and in most of cases release in the gas phase.