How should I terminate water heater drain pan?
What kind of house is it? You mentioned the crawlspace...If it's a modular you could tie it into the main waste line down there as long as you built a trap in between the pan and the waste line.  If that's not an option, going into the bath drain is viable if you can easily access it.... Nothing there would violate code. Also, they make small automatic water pumps that will trigger and pump water up to 20' or higher, in that case route it into your laundry drain.