School and community will need to be treated for the deep shock and trauma caused by the incident, mental health experts have advised.
Peter Wilson, director of Young Minds, a campaigning organisation for children's mental health, said: "The school will have to allow its children to express their grief and feelings. Children should be encouraged to write down or draw how they feel and what they understand about the incident."
Dunblane is a close-knit community. Almost everyone will have known at least one of the 600 children attending the school and most will know the victims, including the teacher who died.
Mr Wilson said: "This will have a profound impact on the whole community. Every child will be frightened, upset, angry and in total incomprehension over the tragic deaths. I am sure that help from mental health experts and counselling will be available.
"It will take a number of weeks before the school can even pretend that it can go back to normal. All the staff should work together to help each other and talk to the children in groups to allow everyone to share their feelings."
Pupils and staff at Hall Garth school, Middlesbrough, are still suffering in the aftermath of the fatal classroom stabbing of Nicola Conroy two years ago.
The trial of her killer, Stephen Wilkinson, occurred almost at the same time as the death of London headteacher Philip Lawrence in a stabbing incident outside his school.
Peter Smith, Hall Garth's head, said children still needed counselling and such incidents brought back that awful day to everyone in the school.
The Gulbenkian Foundation has published a booklet entitled Wise Before the Event: Coping with Crises in Schools to help schools cope with the emotional pressures of such events and advise schools on how to put emergency procedures into place. (Turnaround Distribution, 27 Horsell Road, London N5 1CL, pound;5.)