If shooting hoops was bad for the elbow we'd be hearing about elbow injuries in the NBA. But we don't.
Hoops players don't take as many shots in a game as a pitcher throws pitches in a game. And, most importantly, the arm doesn't move as fast when shooting as it does when pitching.
I think it's far more likely that your elbow pain is from pitching.