There are a few things that can help your 3 months old infant to sleep all night.
Babies are very curious and they learn and watch the world around them all the time so they will realize that sleeping time is the time when their parent isn't with them.This is called separation anxiety in child and it is normal stage of baby's development.
But it can be especially tireing for parents, as babies can be particularly strong-willed, especially about bedtime!
This is a good time to introduce some new baby foods which can help your baby feel sleepy but make sure you do it gradually. The baby needs to learn to self-comfort and get a habit of sleeping alone because that is going to help you with his sleeping arrangements, waking up at night and crying.
Don't change your rituals at bedtime.You can still start out with a warm bath and feeding. Rocking and snuggling, singing or reading - these are all bonding times for mother and baby.
Try to put your baby in his crib with the rocker or glider right next to it so you can sing or read to him if he doesn't fall asleep right away. You can stand at the crib and rub or pat her back. You can move your chair a short distance away from the crib in a week or to but stay in the baby's sight. You can talk or read or sing so your baby would be more comfortable. Try to comfort your baby only if he cries more than 10 or 15 minutes and after that put him back to his crib and go back to your chair. You can sit close to the door in another week or two. Don't rush with the moving of your chair because even these small changes can be difficult for your baby so be patient. Your baby will slowly realize that you are present but that your attention isn't focused entirely on him and the idea of separation will be easier. Use this time for a hobby or something you can do quietly.