Electroluminescence and thermal radiation from metallic armchair carbon nanotubes with defects