I don't know that chickens get lonely or depressed, but they do react to any change, taking some time to adjust, and a hen who just hatched chicks will search for them if they are taken away right away. They also don't do well living alone; they do best in a flock.
You need to get her out of there and see what is under her, and see what condition she is in. You should probably look her over for wounds, and lice/mites, or just any sign of illness or injury.You can wear a pair of heavy work gloves if needed. Or you can have someone gently hold her around the neck with a sort of loop make of fingers, then pick her up by her sides. She should calm down if you hold her firmly for a minute. You can even lay her on her back for better examination.
If she's sitting on eggs and things are OK, you won't find piles of poop in the nest. She will have been getting up, usually once a day, and eating and drinking (and pooping) when you aren't looking. If you want to let her hatch, which is the simplest way to break a broody anyway, just set her down somewhere and let her return to the nest. Don't put the food and water too close to the nest. She needs to get up and move every day, get that little bit of exercise. It's normal for a broody to lose a little weight, and to be missing some breast feathers.
If she hatches some chicks, that can be your flock. If not, you can try to find another hen about her size, after she is up and around, that is. Or maybe you can find a flock to add her to, and start over.
Good luck!