First of all, take a deep breath, all the way in, and then release it, slowly. Now, I went through some of this myself when I was pregnant. I thought it was a girl and was so excited, and then I found out it was a boy and was like "Oh… really? Okay." I felt like I had actually lost a child! The thing is, I was focusing completely on the loss, and also beating myself up with guilt for feeling this way. Lucky me, my husband wouldn't let me off the hook when I said I was 'fine', and when I finally broke down and told him I was then able to cry and grieve over my inner loss, and then let it go. Once I did that I was able to leave it behind me and start focusing on the joy that was growing inside me.
Unfortunately, in my situation, everything wasn't fine with the pregnancy, and we lost our boy. I went through postpartum as well, and I was lucky enough to have a huge support network of friends and family. I changed my diet dramatically, and started taking Fish Oil supplements every day, and was able to make it through with no drugs. If my depression had been any worse, I would have gone on the drugs, without a doubt.
Luckily, I now have an amazing little boy (1.5 years, adopted) and I keep hoping that the next time I conceive, I'll have a boy! Amazing how minds change.
Now that you know you are not alone, let me say this: your grief is not crazy, strange, or unheard of. It's okay! Acknowledge your disappointment and loss, allow yourself a moment to let it out, and then start to look ahead. Talk to your baby. I sang to mine, all the time, and it helped so much. I began to wonder if he was going to look more like my husband, or more like me. I watched movies with little boys. I looked at my own younger siblings (family of seven kids, youngest were twin boys) and began to get even more excited. You can look at your first son and start to envision the two of them growing close and being best friends.
Since you know you have a tendency towards postpartum, be ready for it and nip it in the bud as soon as you feel depressed after his birth AT ALL. You are not alone, you are not crazy, and there are tons of people ready to help you. So be aware, and attack it as soon as it rears its ugly head. Hopefully it won't.
I do have a question: why do you feel this will be your last child? Health issues? Finances? Stress and work? There is nothing wrong with trying for a third child. Groups of three tend to be better than groups of two, in friendships and sibling relationships. I was great friends with the two brothers closest to me in age! It was always the three of us.
I hope this has helped, and if you need an ear to listen, please, please send a message! I will be praying for you.
God bless!
M. D