Always keep your dog on a leash. Don't give him one more chance to go chase an animal, and if he chases them in the yard, start leash walking, even for bathroom breaks, until the behavior is under control. To work on the behavior on the leash, the best thing you can do is to redirect your dog's attention. Is he food motivated? Toy motivated? Anything that's not a small animal will do! Anytime you even begin to see your dog look sideways at a small animal on a walk and react, turn in a different direction and offer the toy or treat when the dog responds appropriately and allows himself to be distracted.
The idea is to grab your dog's attention away from the animal and reward him with something that proves to be more enticing than the animal. This means arm yourself with TASTY, TASTY treats. Use a treat pouch stuffed with these treats, leash your dog, and go to an area that you know will have the distraction. Stay at the farthest distance where your dog notices the squirrels, but isn't so close to them that he just goes absolutely bananas.
The key is to make looking back at you more rewarding than going after the squirrel. Once your dog is amazing at this on leash, you can REALLY strengthen his recall and attempt off leash. It does take patience, practice, consistency, and time. It eventually desensitizes your dog to that which they are excited by.