The annihilation cross section of TeV scale dark matter particles $chi^0$ with electroweak charges into photons is affected by large quantum corrections due to Sudakov logarithms and the Sommerfeld effect. We calculate the semi-inclusive photon energy spectrum in $chi^0chi^0to gamma+X$ in the vicinity of the maximal photon energy $E_gamma = m_chi$ with NLL accuracy in an all-order summation of the electroweak perturbative expansion adopting the pure wino model. This results in the most precise theoretical prediction of the annihilation rate for $gamma$-ray telescopes with photon energy resolution of parametric order $m_W^2/m_chi$ for photons with TeV energies.