It's from an interview of David Foster Wallace conducted by Gerald Howard, his former editor, for Elle magazine volume 11 issue 6, some time in 1996, the year Wallace's magnum opus Infinite Jest was published. Edmund Waldstein has transcribed the entire interview on his blog and also provided a scanned PDF for download.
The specific quote is in response to Howard's question:
Why write fiction at all, let alone 1,100-page novels, in our age of attenuated attention spans?
(a) Stories let us talk to one another about stuff that just can’t be talked about any other way; no semantic model could explain why Cynthia Ozick’s image of floating Jews in “Levitation” means as much as it does; (b) I’m pretty lonely most of the time, and fiction’s one of the few experiences where loneliness can be both confronted and relieved. Drugs, movies where stuff blows up, loud parties—all these chase loneliness away by making me forget my name’s Dave and I live in a one-by-one box of bone no other party can penetrate or know. Fiction, poetry, music, really deep serious sex, and, in various ways, religion—these are the places (for me) where loneliness is countenanced, stared down, transfigured, treated. In lots of ways it’s all there is.
Judging from the structure of that answer, I would guess that the interview was conducted via email.