You need to retain a lawyer immediately. In reviewing your statement, it would appear the search is not proper but there could be other factors. Also the fact this involved possession of a controlled substance you should contact an attorney in your area to protect your rights.
The cops are going to argue that the claim that someone had a gun gave them "exigent circumstances" to bust in without a warrant. I can virtually guarantee you that will be their excuse as a former judge and DA. However, they are limited to looking for people with guns, not searching every nook and cranny of the room. Additionally, the fact that they had the wrong apartment is a HUGE issue and has overturned search warrants in CO on numerous occasions before. You have some very valid issues and need to hire a criminal defense attorney. Best of luck.
The information provided in this answer does not create an attorney-client relationship. If you are interested in his legal services, feel free to call Chris at (303) 409-7635 at his law office in the Denver Tech Center. All initial consultations are free of charge.
You absolutely need to retain the services of a criminal defense attorney with some experience! The fact that the polcie entered your apartment on a mistake will be explained away by "exigent circumstances." What does that mean? it means they will claim they did not need a warrant because of the emergency involved -- a gun being involved, for example. Mr. Leroi is absolutely correct when he says that while they may have made a mistake coming into your place, the authorities do not have the right to open up all of the shoe boxes in your cliset -- they have a right to deal with the exigency (or emergency) and that is all.
There is something wrong with the situation and an experienced criminal defense attorney should be able to help you fix it!
Best of luck to you.
In no way am I offering you legal advice, and in no way has my comment created an attorney-client relationship. You are not to rely upon my note above in any way, but insted need to sit down with counsel and share all relevant facts before receiving fully-informed legal advice. If you want to be completely sure of your rights, you must sit down with an experienced criminal defense attorney to be fully aware of your rights.