In a letter to Gauss, on January 3, 1840 (Werke II), Dirichlet stated the unit theorem in the same version as he would later publish it, along with the comment that the proof was very easy and could be given on two or three pages. Indeed the proof he published in 1846 was little more than 2 pages long. In addition, the French version of his proof was contained in a letter to Liouville, and was published already in 1840. I think this shows convincingly that the problem he solved in the Sistine Chapel in 1844 was not related to the unit theorem.

On the other hand Kummer, in his talk to the memory of Dirichlet, said that Dirichlet worked out the class number formulas for the equivalence classes of forms corresponding to fields of the p-th roots of unity while he was in Italy; in fact his articles on units that Dirichlet published before his journey to Italy are directly related to problems showing up in such an investigation. When Dirichlet heard that Kummer was also working out the class number formulas for such fields, he decided not to publish anything on this subject.

Edit. I'd like to add a few quotations from Kummer's papers concerning Dirichlet's results obtained in Italy.

- 1844, De numeris complexis.

*For most numbers $\lambda$, the investigation of all units is very difficult and requires particular principles, which so far we have not yet sufficiently examined. We may skip this question, however, since we have heard that recently Lejeune-Dirichlet in Italy, where his still dwells, has worked out fundamental theorems on these complex units that we eagerly expect him to publish soon.*

- 1846, Zur Theorie der Zahlen

p. 324: *This investigation on the real and ideal complex numbers is completly
identical to the classification of certain related forms of degree $\lambda-1$ in $\lambda-1$ variables, of which Dirichlet has found but not yet published the main results.*

p. 325: *I have so far not yet studied this area of the theory of complex numbers
in depth; in particular I have not yet worked out the determination of the true number of classes since I have heard by word of mouth that Dirichlet, using principles similar to those in his famous memoirs on quadratic forms, has already found this number.*

- 1846, Zerlegung der Wurzeln der Einheit:

*The complete determination of those powers of ideal numbers that become real, as well as the determination of the number of inequivalent ideal numbers, requires principles that differ essentially from those given in the present memoir. We do not discuss this important question any further since, as we have already mentioned, the publication of an article by Dirichlet is imminent in which he has completely solved this question for a closely related topic.*

- Beweis des Fermatschen Satzes

Assume that (A) the class number of $K = {\mathbb Q}(\zeta_p)$ is not divisible
by $p$, and (B) that each unit in $K$ that is congruent to a rational
integer modulo $p$ is actually a $p$-th power in $K$. Then the equation
$x^p + y^p = z^p$ does not have nontrivial solutions in integers.

This article was presented to the Academy of Berlin by Dirichlet, who
added the following remark.

*The truth of the second assumption of Kummer's astute proof may be
verified for each given value of $p$ using the general theory of
complex units, about which I have given a few hints in the report
from March 1846 and which will be published in one of the next few
volumes of Crelle's journal.*

*After I had proved that every unit may be represented by $\frac{\lambda-3}2$
fundamental units, which is the result analogous to the general solution
of Fermat's equation $x^2 - Dy^2 = \pm 1$, it was natural to follow
this analogy between quadratic and these higher forms by determining
the number of the latter forms by methods similar to those with which
the same question in the theory of quadratic forms was solved. This
investigation, to which Kummer referred at the beginning of his note,
was luckily completed three years ago with the help of a new principle
that was not necessary for the determination of the number of forms
of the second degree, and has led to a result that is remarkable in its
form and which is as simple as may be expected for a result that
encompasses forms of all degrees. The expression for the number for forms
of degree $\lambda-1$ that I have found, which, as may be expected by
the analogy with quadratic forms, contains the $\frac{\lambda-3}2$
fundamental units, provides us, as soon as these units are known, with
a method to verify assumption (A) by a rather simple numerical calculation.*

intellectuallife of a mathematician; in fact what I really wanted to know is whether Eisenstein's musical creations seem informed in any way by his mathematical mind. I could have asked that, but knowing whether a single example survives seemed more basic. – David Feldman Sep 3 '12 at 3:56other then the one at hand.– user9072 Sep 3 '12 at 4:01