When you're dwelling on something, you're brooding about it — this can be thoughtful or morbidly obsessed.
www.vocabulary.com