Tell him after - a home pregnancy test can be faked, so if he thinks you want him back, he'll assume it's fake and it'll start his relationship with the kid (whether he has a relationship with him/her right away, or far in the future) on a really sour note.
But once you have a doctor involved, and you're sure of the dates (and you already are, I know) and how far along you are, he'll be more accepting.
Also, it'll give you time to figure out how you want to approach him, what you want to say, and what you want out of telling him. If you want him back, be up front about wanting to raise the baby together. If you don't want him back, tell him that you don't want him but do want him to know about the baby so he can be involved with the pregnancy, birth, and child if he wants to be. And if he doesn't want to be involved, you tell him that you didn't want him to be surprised 18+ years down the road and bye, Felicia.
I hope things go well for you!
Chelle