2 “How long shall I place counsel in my soul?”. There is no need of counsel but in adversity. Therefore “How long shall I place counsel in my soul?” is as if it were said, How long shall I be in adversity? Or at least it is an answer, so that the meaning is this, So long, O Lord, will You forget me to the end, and so long turn away Your face from me, until I shall place counsel in my own soul: so that except a man place counsel in his own soul to work mercy perfectly, God will not direct him to the end, nor give him that full knowledge of Himself, which is “face to face.” “Sorrow in my heart through the day?” How long shall I have, is understood. And “through the day” signifies continuance, so that day is taken for time: from which as each one longs to be free, he has sorrow in his heart, making entreaty to rise to things eternal, and not endure man's day.
Source: The Enarrations, or Expositions, on the Psalms (New Advent)