Your practice swing should be more than just a warm-up swing. It should be a rehearsal of the swing you want when you hit the ball. If you are working on swing changes, then think about the mechanics during your practice swing and then try to imitate that feel once you address the ball. You should pick a target and focus on that target during your practice swing. Visualize the positive results of your shot while taking that practice swing. If you look at the water, you will hit it in the water. If you say to yourself "don't hit it there", that is exactly where you will hit it. Keep all your practice swing thoughts positive and you will have more positive results hitting the ball.
It is also very important if you have a shot that is less than a full swing, or if you are chipping and putting to make your practice swing the same length and same speed you think you need for the shot you are going to hit. If you only need a half swing, then make your practice swing a half swing. If you have a three foot putt, then take a short practice stroke, not one that will hit it to the other side of the green.
And finally, if you hit a poor shot, then take a practice swing right then and there, correcting what you feel you did wrong. This will help with your muscle memory and it will also help you be able to leave the bad shot in the past and focus on the good feel for your next shot.