In this work, we provide a solution to the problem of computing collision stress in particle-tracking simulations. First, a formulation for the collision stress between particles is derived as an extension of the virial stress formula to general-shaped particles with uniform or non-uniform mass density. Second, we describe a collision-resolution algorithm based on geometric constraint minimization which eliminates the stiff pairwise potentials in traditional methods. The method is validated with a comparison to the equation of state of Brownian spherocylinders. Then we demonstrate the application of this method in several emerging problems of soft active matter.