Keira Knightley says she had to go through "many years of therapy" after starring in the first Pirates Of The Caribbean film.