Bound states in the three-dimensional electron gas with repulsive or attractive test charges: many-body effects