If you had a head gasket problem, or a crank problem, I might say repair it. But both problems will cost more than a good used engine.
I'd find an engine with 50-75k miles, maybe do intake gaskets before dropping it in the car. (Common GM 3.1 and 3.4 failure)
You will be money ahead, and end up with a better engine.
I did a head gasket job on a 3.1 and when I got it all apart found one of the heads was cracked, so there is no guarantee it wont get more expensive than your current estimate.