I would actually confess straight after the A-sample. Immediately apoligise to friends, family, teammates at a press conference. Accept any suspension given to you. After the press conference, never talk to the media again, until you sign with a new team (at the end of suspension) and then claim you are a new rider/man.
DO NOT tell anyone where you got the drugs. It wasn't teammates, team doctors, nothing. No information whatsover to blame someone else. Take ALL the blame yourself. Clear your consience.
During your suspension. Train your **** off, CLEAN. Rocky Balboa style - go live in the mountains for 12-18 months (assuming you get 2 years suspension). Take up local mountain bike racing to keep the competitive edge.
Also, watch cycling religiously. Go learn the history again. Get reinspired to come back CLEAN.
These types of roles in the 2 year suspension will at least give you a better chance of getting a new team, getting some new fans, getting some income, and maybe, if you believe you can compete clean, get some fresh results.
Ideally, if you were a GT contender/winner before the suspension, do not even bother trying to win one after the suspension - that was the old you. If you were a climber-GC rider, go for the KOM or something. If you were a TT-GC rider, aim for time trials only. Third option, become a super-domestique, pledging to help your team leader win clean.
That's what I would do. But hey, I wouldn't have doped in the first place. So the only way I test positive is innocently...
Finally, don't expect to be welcomed back with open arms by fans and teammates. After all, you cheated. You were scum then, but every one gets a second chance to redeem themselves, so make the most of it and FFS DO NOT EVER TOUCH THE DRUGS AGAIN!!!