His confession at the end would NOT be admissable in court. It is the equivalent of beating a man up in interrogation and scaring him into confessing. Since last episode Castle was all "getting the right guy", him doing this quite annoys me.
I get this guy seemed very guilty, but there was little to no evidence that it actually was him. So yes, Tom's confession is not a real confession. He was scared. If I had someone coming at me with a knife saying "you murdered my brother" I'd probably admit to doing it as well thinking it's what they want to hear (especially if my pleas that I didn't do it didn't work). Doesn't mean I did it, means I'm saying what I think they want to hear.
Only annoyance of this episode. Love the rest.