The answer to your initial legal question is: No. It would not be worthwhile to file a lawsuit against the police. You have not indicated that there is legally admissible proof that your 4th Amendment rights were violated. You have expressed nothing indicating that you had quantifiable damages. You have not been charged with anything, you have not had to retain a lawyer, and apparently there wasn't a sizeable life insurance policy with you as a beneficiary that is not being paid out pending the conclusion of the "undercover investigation".My guess would be as good as anyone else's. This is going to sound really bad and I'm sure once everyone reads this they all will roll their eyes and think to themselves thanks for wasting my time but as I'm sure everyone can imagine that if you are the subject of an undercover investigation the police or the agents who are working undercover aren't going to come right up to you and say Hi, I'm Agent so and so please let me into your life because I'm conducting an investigation into any possible criminal activity you may be involved in so just pretend I'm an old friend or whatever while I snoop all around you. I'm guessing that would really blow their cover. After a while, it's pretty easy to figure out though. I'm sure I freaked them out several times when calling them out on it but they apparently they had a job to do and did it, in my eyes, not a great job because it was so obvious but whatever. So, I can't think of a full proof way to be 100% sure that these fellows are working undercover because that would probably blow their cover too if I were to find out and haven't been arrested and spending the rest of my life in prison. Eventually, they have to exit stage right and won't be able to do damage control or whatever. I hope and pray that I'm 100% wrong about all of this, that would be so wonderful and great, it would actually be a dream come true, however, I'm as sure as a person can be without having direct knowledge and if I had direct knowledge they would send somebody I didn't know to investigate me as the worse case and the most likely scenario would be that I'd never been under investigation because I'd be a part of law enforcement if I had that kind of knowledge, which I'm not. I hope that all makes sense, you might need to read it twice. I'm happy to answer more questions if need be. I hope somebody who reads all of this does get it and has an answer for me but I do understand that it's probably not something people hear about or read about every day. I'm sure most who are the targets of an investigation ends up in jail and never catch on that these new peeps in their lives are actual cops or others may be too frightened to ever even open their mouths up about their suspicion hoping it will all just go away, you know the kind, bootlickers per say.
Life can sometimes be very unfair.
I think that you could better spend your time going forward with your life. You would benefit greatly from bereavement counselling.