The 29-year-old had to check into a treatment facility back in 2008 to be treated for depression.
And in her new movie Melancholia, directed by Lars von Trier, she plays a woman called Justine with the illness.
She says her own battles with the mood disorder were part of the reason she wanted to star in the flick.
In an interview with UK Elle magazine, Dunst said: 'I have experienced depression. Many people have. Mine was caused by a few things. I felt a lot of stress from all these different areas and I needed to... It's delicate.
'You can go through many wrong doors before it gets right. I brought my own slant [to the role] but I am very much portraying Lars' experience of depression. We met before I did the movie and talked about how the light goes out of your eyes. People don't talk about depression, so for me it was really amazing that this was going to be portrayed.'
Relationships are thought to be one of the reasons Kirsten sought treatment, after she split from musician Johnny Borrell.
But the actress, who is currently romancing Jason Boesel, can't imagine dating someone else in the movie industry.
She added: 'I don't think actors should ever be together. How can two actors ever make a go of it? If you do what I do, you get to meet all these amazing actors, musicians, artists. It sounds great but you can be swept away and I want marriage and children. Not yet. In a few years with a Jimmy Stewart kind of guy who is gentle, graceful, intelligent, someone who live his life by a set of rules.'