Soul of the Raven is described as
As a Bonus action when your raven is perched on your shoulder, your body merges with your raven’s form. While merged, you become Tiny, you replace your speed with the raven’s, and you can use your action only to Dash, Disengage, Dodge, Help, Hide, or Search. During this time, you gain the benefits of your raven being perched on your shoulder. As an action, you and the raven return to normal.
It doesn't specify anything besides your size/speed change, so you retain all other stats. It is you who takes damage, with your AC and statistics. When your HP reaches 0, both of you die. There is nothing written about what happens to your shape when you die, so that would be up to the DM.
I personally would make you remain in raven form. You are merged until you decided not to be anymore. However, The Raven Queen suggests that, as "The raven vanishes when it dies, if you die, or if the two of you are separated by more than 5 miles.", it makes more sense to change back into your form when you die since the raven you were merged with vanishes.