The actress plays a woman whose wedding coincides with the day that Earth collides with another planet.
She told The Independent: "Even if you don't like this movie, it's gonna mess with you somehow, or make you really angry.
"What I've noticed in myself is when I've got really angry with films, there's sometimes something in me that I didn't want to see, that I was feeling but didn't even know it yet."
Dunst won the Cannes 'Best Actress' award for her performance in the film from controversial director Lars von Trier.
"Lars opened up to me about his personal depression... That also makes you feel more open with him," she said. "My first impression was how vulnerable and how sensitive he is – I felt, even though I didn't know him, 'I'll take care of you!' That's his vibe... But he can be very shocking."
Dunst was forced to deny that she had fallen out with von Trier over his press conference at the Cannes Film Festival, in which he joked about Nazism.
The Marie Antoinette star said this week that people who have never suffered from depression before were "weird".
Melancholia will be released on September 30.
Watch the trailer for Melancholia below: