Oh good grief, shape up woman! You manipulated a situation (job, getting close, shoulder to cry on) or your own gains and you lost. I can't believe that with that degree of manipulation you had no clue you might not win or that you're a completely wounded pussy cat.
Fair play, you had a go, but it's game over now. He's said he's not interested and he's already left his wife and decided that life's not for him so it's time for you to back off and leave well alone. He doesn't want you. I think you've planned and wanted this for so long that you can't see the wood for the trees.
Unrequited love is naff and horrid and painful but you do get over it. You insistance that there was something there and he did feel something for you is just you deluding yourself and even if it isn't, he's made it perfectly clear he doesn't want to be with you. You've set your hopes so high and built so much of your life around this that for you to let it go makes you feel like you're letting the best thing in your world go. You're not, you'll be fine and you won't believe me on that til you've let him go and you are fine but doesn't make it any less true. You will be ok.
In the mean time, get another job. I agree entirely it's best you leave, you've built too much of your world around him. Go curl up in a ball, have a cry, feel depressed and rubbish and what have you but in the mean time, get your own life. He already has one and it doesn't include you. You owe it to yourself to put yourself in a happier situation.
Take care and good luck.