Has anyone ever made such a beautiful film about the end of the world? So far, films dealing with the Big End have taken their cues from the apocalypse and science fiction genres. The end-of-the-world film is firmly held within the disaster film bracket.

Lars von Trier’s Melancholia subverts the genre and turns it into poetry. It finds inspiration from German Romanticism in terms of visual design while featuring the usual von Trier trademarks that veer between the sublime and the ridiculous – somewhere in the middle lies von Trier’s art.

Kirsten Dunst is perfectly cast as Justine, the profoundly depressed heroine who evolves from human wreck in act one to fortress in the second part. Conversely, her nervy, bourgeois sister Claire, played by Charlotte Gainsbourg, inexorably spirals into despair as her world – and everyone else’s – threatens to disintegrate, literally.

Both acts are played out against an over-the-top aristocratic setting. The first unravels over a toe-curling, awkward wedding ceremony between Justine and Michael (Alexander Skarsgard). The party was funded by Justine’s brother-in-law, John (Kiefer Sutherland), who becomes increasingly exasperated at her rambling, erratic behaviour which culminates with the end of the union before it even started in earnest.

Her mother’s ruthless behaviour gives us a clue as to the origins of Justine’s behaviour although her father Dexter (John Hurt) is the opposite: a cultivated, well-mannered gentleman who in the end seems to have had enough of his daughter as well. Several threads of narrative play themselves out in the first course, marked by conflict and lack of communication between the characters involved.

The second act becomes more minimalist and it includes Justine, Claire, John and their son Leo (Cameron Spurr), a captivating child actor whose presence grows as the film progresses. And it’s in the second act that Von Trier treats his audience to a stunning sequence of images. Bird’s eye view shots of horse riding in the woods; Justine’s moonlit nightly excursion into the garden; and the stunning representation of the approaching rogue planet called Melancholia.

The dialogues often sound contrived and clichéd, but at the same time pregnant with irony. They are parodies of the banality of most conversations in real life. Critics say von Trier manipulates his actors like puppets; I’d argue that his style of directing is precisely what renders them mirror images of the audience.

Despite the title, Melancholia is not misery porn. In fact, I left the cinema feeling lighter, moved and a little elated. It is a film about depression but it’s also about hope and the beauty of letting go. It makes a vague reference to the fear of ecological collapse and the uncertain future that humanity faces, but it’s very subtly weaved in. Von Trier succeeds in turning fear of the end into a poetic celebration of it.

Melancholia opens in the UK on September 30.