It can be really tough to try to change your arm path. But this exercise/drill can help. Use 3-5 lb neoprene lightweight dumbbells and perform the movement slowly.
Full Range Of Motion (ROM) Drill: Perform slowly! Slowly mimic the arm action of pitching motion. Separate hands down and back by squeezing shoulder blades together and thrusting chest outward. Continue the throwing motion right through your follow through position. Then go in reverse. Be slow and deliberate. Use good form. Repeat.