10 tablets is a lot, and from what you have said seems to lead to unconsciousness instead of allowing sleep. I would be careful with your use of codeine as it can be highly addictive. It can be very harmful if used in large doses, including permanent kidney and liver damage, hallucinations, seizures and brain damage.
I can completely understand the feeling of wanting to blank out and forget but I would really be speaking to your doctor about the risks and other possible solutions that are better for your health. I used codeine myself for a while to try and get rid of my depressed feelings but eventually found that it just made me feel even more depressed and all I ever thought of was being able to pass out and forget.
When I looked around I found a site about codeine and the risks as well as possible ways to help -
http://www.codeineaddiction.com/.
Hope this helps

There are safer ways to manage. They take time and I won't lie - it isn't easy - but there are safer ways