There are times when it doesn't work out. I got a puppy when my son was little and the puppy (large dog) was too feisty and scared my son. My son hit the dog with a hammer! (Small hammer, but still!

) We immediately searched until we found a new home for the dog.
The second dog we got we had until she died at 12 years old.
I don't have any pets now because of finances and my level of anxiety, and yes, taking care of a pet when alone can actually produce anxiety. I don't have a yard and there's no way I would have a dog without a yard.
I don't even have pet plants because I was traumatized when I moved and all my plants died, including my 5 year old cactus (from bad lighting in my new place) -
Animals adapt and a new owner who can give your pet more exercise might be best. As well, I believe that animals pick up on our emotions...and if you are anxious around the dog it will pick up on your emotional tenor.
Best of luck. It's a tough situation but you will do what is best for both you and your pet, I am sure.