The child suffers from breath holding spells, also called cyanotic breath holding spells. This is a benign condition and will resolve by the time he reaches his third birthday. Children benefit by iron supplements-hence get his haemoglobin tested. If it is low, your doctor will prescribe iron supplements.
During the attack, don't lift your child; keep him in a horizontal position on the bed with his head turned to one side - he will start breathing again.
I would reassure you that breath holding spells are not epileptic, so no expensive tests are required.