Practice trigger control with an empty gun (use dummy rounds or snap caps) and do not rush or anticipate the shot. Trigger control is slowly squeezing the trigger with slowly increasing pressure on it until it fires - never pull or jerk a trigger When the gun fires it should be somewhat of a "surprise" as to the precise moment it goes off. You can start off live shooting with a .22 and work up from there. Do not move up until you are flinch-free with the lighter and smaller calibers. When you pull the trigger your gun's barrel should not move downward. Focus on your sight picture - it is perfectly ok to have the target be somewhat blurry. The human eye is incapable of keeping the rear sight, front sight and the target all in focus at the same time. Squeeze, do not pull. Gently increase pressure until you hear the bang. Master that and you have mastered trigger control and eliminated the flinch.
If you don't have a 22 revolver you might consider buying or renting one (or shooting with a friend that has one. Just buy some ammo for it. Stay with it until you master - no more flinching.