"Difficultness" isn't a word. You want the word "difficulties" or "difficulty" depending on your meaning. I think in your sentences "difficulties" works best.
"When I've encountered difficulties..." (=present perfect tense) You have had the difficulties at various times in the indefinite past. And since difficulties can still come up, you can say "Whenever I've encountered difficulties..."
"Whenever I've encountered difficulties, I've turned to my friends for help. They have always had good advice for me."
"When I encountered difficulties..." (=simple past tense) You had the difficulties in the past but not any more.
"I'm so glad I quite my job. My boss was a jerk, and when(ever) I encountered difficulties, no one helped me."