Assuming that you like them, get a dog. You will have to leave the house at least four times a day (three if you work outside the home and get a dog walker) to walk the dog. That makes sure that you don't just stay inside all the time. 
If you aren't sure if you want to commit to a dog yet, go to the humane society and volunteer to walk a dog.
If just the idea of leaving the house several times a day for ten or fifteen minutes at a time fills you with dread, then you are right to be concerned and should talk to a professional health care provider.