The chemical reactions and pathways involving a dihydrobiopterin, a reduced pteridine derivative related to folic acid; it acts as an electron carrier in tyrosine biosynthesis and its quinoid form is produced by oxidation of tetrahydrobiopterin in several biological hydroxylation reactions.