During the formation of large-scale structures in the universe, weak internal shocks are induced within the hot intracluster medium (ICM), while strong accretion shocks arise in the warm-hot intergalactic medium (WHIM) within filaments, and the warm-cold gas in voids surrounding galaxy clusters. These cosmological shocks are thought to accelerate cosmic ray (CR) protons and electrons via diffusive shock acceleration (DSA). Recent advances in particle-in-cell and hybrid simulations have provided deeper insights into the kinetic plasma processes that govern microinstabilities and particle acceleration in collisionless shocks in weakly magnetized astrophysical plasma. In this study, we adopt a thermal-leakage type injection model and DSA power-law distribution functions in the test-particle regime. The CR proton spectrum directly connects to the Maxwellian distribution of protons at the injection momentum pinj = Qppth,p. On the other hand, the CR electron spectrum extends down to pmin = Qepth,e and is linked to the Maxwellian distribution of electrons. Here, pth,p and pth,e, are the proton and electron thermal momenta, respectively. Moreover, we propose that the postshock gas temperature and the injection parameters, Qp and Qe are self-regulated to maintain the test-particle condition, as the thermal energy is gradually transferred to the CR energy. Under these constraints, we estimate the self-regulated values of the temperature reduction factor, RT , and the proton injection parameter, Qp, along with the resulting CR efficiencies, ηp and ηe. We then provide analytical fitting functions for these parameters as functions of the shock Mach number, Ms. These fitting formulas may serve as valuable tools for quantitatively assessing the impact of CR protons and electrons, as well as the resulting nonthermal emissions in galaxy clusters and cosmic filaments.