As Mexico celebrates the Day of the Dead (Día de los Muertos), I'm reminded of a visit I once made with a Swedish friend to the Museum of Mummies in the picturesque colonial Mexican city of Guanajuato. The perfectly preserved corpses of babies and adults were brashly displayed amid neon lights, fake cobwebs, and other cheap Halloween-esque adornments. Confronted with this seeming lack of respect for the dead and vulgarity of the displays, I explained to my shocked companion that Mexicans have a peculiarly different relationship with death to other cultures. As the Nobel prize-winning Mexican writer Octavio Paz explained in his seminal work Labyrinth of Solitude:

"The Mexican ... is familiar with death, jokes about it, caresses it, sleeps with it, celebrates it. True, there is as much fear in his attitude as in that of others, but at least death is not hidden away: he looks at it face to face, with impatience, disdain or irony."

The celebration of the Day of the Dead – which is actually a week of festivities which begin on 28 October and end with a national holiday on 2 November – is an integral part of this embracement of death that is particular to Mexican national identity. During this period, the popular belief is that the deceased have divine permission to visit friends and relatives on earth and enjoy once again the pleasures of life. To facilitate this, Mexicans visit the graves of families and friends and adorn them with brilliantly colourful flowers and offerings of food – in particular the sugary "bread of the dead" – spices, toys, candles, and drinks amongst other things. The period is specifically a joyous, ritualistically elaborate celebration of life, rather than a sober mourning of its passing.

The origins of the Day of the Dead rest in the 16th-century fusion of the Aztecs' belief in death as merely one part in the wider cycle of existence, their ritual venerations and offerings to the goddess Mictecacihuatl ("Lady of the Dead") for deceased children and adults, and the conquering Spaniards' desire to accommodate these festivities within the Catholic celebrations of All Saints' Day and All Souls' Day. While contemporary observance of the Day of the Dead does include masses and prayers to saints and the dead, it is dominated by carnivalesque rituals to a far greater extent that the orthodox Catholic celebrations found in western Europe.

Nevertheless, in a country as socially and geographically diverse as Mexico, there is significant regional variation in the nature of festivities: the southern state of Chiapas is far more likely to focus its efforts on processions and public commemorations of death than the valley of Mexico, where the decoration of altars in homes and tombs of the deceased is more popular. Urbanisation, too, plays a large role in regional variations. For the south and rural areas the period holds far greater social and cultural significance than in the north and large cities; families and communities in rural areas will often spend large parts of the year preparing for the occasion.

As the anthropologist Claudio Lomnitz correctly points out, in many respects this "playful familiarity and proximity to death", is all the more unusual in contemporary Mexican culture because so much of Euro-American 20th century thought has been about denying death – preserving the life of the citizen at all costs. The existence of this peculiarly Mexican attitude is born of three major themes in Mexican history.

First is the Aztec heritage of the pre-Columbian concept of life and death as part of a broader cycle of existence, which fused with the Christian veneration of the deceased on All Souls' Day into a wholly unique concept of death. Second, is the violent and tumultuous nature of Mexico's past; the brutality of the Spanish conquest where the indigenous population of central Mexico was decimated over the course of the 16th century; the humiliating subjugation at the hands of its North American neighbour; and the bloodbath of the Mexican revolution. These upheavals made it impossible to ignore the commonplace reality of unnatural death in Mexico. And thirdly, the appropriation (or reappropriation from their Mesoamerican heritage, as many saw it) of "death" by Mexican intellectuals post-revolution in the early 20th century meant direct confrontation with the mortality of life became ingrained in the national psyche. As the artist Diego Rivera said in 1920: "If you look around my studio, you will see Deaths everywhere, Deaths of every size and colour."

Learning how to cope with mortality has always been a central preoccupation of human existence. The celebrations of the Day of the Dead provide an insight into how the Mexicans do it.