This week I preached on loneliness in the life of King David. The story is told in 1 Samuel 21-22 and he wrote Psalm 142 at this time, which is what I focused on.
I referenced a talk I contributed to a couple of years about singleness (and loneliness) which you can listen to here. If you want some more on this subject, Mark Driscoll has done a typically thorough job and I also read this article by Jayne Clark as part of my preparation.
As a special bonus, here's a Spotify playlist of songs on this theme, from Hank Williams to Akon. It's not the cheeriest you'll ever hear but there are some classics on there.