Mark Crockett, 53, built the device after checking in to the Logierait Pine Lodges resort near Pitlochry, Perthshire, last February.
The park was evacuated after paramedics found Mr Crockett in a chalet with a suicide note alongside the improvised bomb.
Crockett, of Falkirk, admitted making the device at a hearing in December.
The High Court in Livingston heard that the amateur bomb was assembled using an after-shave tin, screws, fire-work parts and sugar.
Staff at the holiday park raised the alarm after Mr Crockett failed to check out of his lodge on 4 February 2015.
It sparked a major incident involving police, a special response team and the bomb disposal unit.
The hospitality manager had left a suicide note on the door of his chalet saying the nail bomb was intended for social workers in London.
The court was told Mr Crockett had suffered an emotional breakdown and was angry at members of his own family.
The judge, Lord Armstrong, described the bomb as "amateurish or even inept" and accepted it was unlikely to explode fully.
But he said the gravity of the offence meant he had no alternative but to impose a custodial sentence.
A man who triggered a major alert with a nail-bomb at a holiday park has been jailed for two years and three months.