I am sorry for your loss and understand both how you feel and how difficult this choice is to make. Try to be comforted by the fact that you gave Maggie the greatest gift anyone can give another living creature, freedom. Freedom from constant unending pain, freedom from hopeless waiting for death, and freedom from causing the one she loves the most the pain of watching her go through all this.
One of the saddest things you'll have to face is that if you get another pet you'll probably have to face this decision again someday. But that's okay because they love you and you love them and the time you have together will be precious and when they have to leave Maggie will be there to play with them. That's what I tell my pet friends who I've had to let go. I hold them while they're injected and tell them all the playmates they'll have when they get where they're going. They won't have any more pain and they'll never be hungry or thirsty or unhappy. It helps--a little
Another thing I do is write about my friends. If you enjoy writing, think about Maggie and write her a thank you letter for being your friend and companion. Include some of the good times you had together and some of the bad.
Like with people, you'll always miss her but once the acute pain of grief passes you'll be able to remember all the good times and the fun and the silly things that all dogs do.