Sir Paul McCartney thinks songwriting is like "talking to a psychiatrist" because it's a way to express his "troubles".