Since Germany was almost totally overrun - including Berlin, where Hitler was trapped - by the time Hitler killed himself, the bomb wouldn't have been used in Germany. OTOH, Japan was hundreds of miles from the nearest US-held territory, was still fighting like Hell, and invading one of the Japanese main islands was going to be on the same or a larger scale than Normandy, with the likelihood of far greater casualties. Then there were the hundreds of thousands of Allied POWs in Japanese hands who were cut off from food supplies (ignoring Japanese brutality).
I doubt Truman took very long to decide to drop "The Bomb".