The main aim of this work is to price defaultable bonds. In order to achieve this goal we link first hitting densities of Brownian motion with functionals of controlled diffusions. From a practical point of view examples of diffusions with this property are: Brownian motion with linear drfit, the 3D Bessel process, the 3D Bessel bridge, and the Brownian bridge, just to mention a few. In turn, these processes are used in finance and economics since they may fall within the category of controlled processes, and/or mean reverting processes.