Teddy Randazzo ( May 13 , 1935 - November 21 , 2003 ) was an American singer , songwriter and record producer , best known for his work in the 1950s and 1960s . Teddy Randazzo ( May 13 , 1935 - November 21 , 2003 ) was a NYC born pop songwriter who composed 1960s hit songs such as `` Goin ' Out of My Head '' , `` It 's Gonna Take a Miracle '' , and `` Hurt So Bad '' .