Depends ... 1 - Have you gone to the allergist to get treated, so the dog doesn't bother you? 2 - Is the dog "hypo-allergenic" (certain breeds don't trigger dog allergies)? 3 - Does the dog shed a lot (shedding hair/dander is what triggers allergies)? 4 - How serious is your allergy (could it be life threatening)?
With those in mind ... you should be able to decide whether it's better to give your dog up or not.
I think this depends on what type allergy & the severity of allergic reaction you have to your dog. If I rub my eyes after petting a cat or my dog, my eyes get watery, itchy, & irritated. I just make sure to wash my hands regularly, and it's not a problem. If your allergic reaction is severe, such as an asthma problem, & is making you miserable, it's a different story!