In this paper, we study a class of constrained group sparse \(\ell _0\) regularized optimization problems, where the loss function is convex but nonsmooth and the feasible set is defined by box constraints. First, we propose a smoothing proximal gradient block-coordinate (SPGBC) algorithm, which is a novel combination of the proximal gradient block-coordinate algorithm and the smoothing method. We prove that any accumulation point of the iterates generated by it is a local minimizer of the considered problem and its zero entries can be identified in finite iterations. Moreover, we show that the proposed SPGBC algorithm achieves a local convergence rate of \(\mathcal {O}(k^{-(1-\nu )})\) on the objective function value, where \(\nu \in (\frac{1}{2},1)\) comes from the decay exponent of the smoothing parameter. Second, we consider a randomized variant of the SPGBC algorithm, the R-SPGBC algorithm, and obtain that the iterates generated by it converge to a subset of local minimizers of the original problem with probability 1. In addition, we establish that the R-SPGBC algorithm attains a sublinear convergence rate in expectation. Finally, some numerical examples are performed to show the efficiency of the proposed algorithms.