Should I include only my main keyword in h1 tag? Should title be the same as h1 for best rankings? If so, should I include my second keywords in h2 or title? Or both?
Think about it from your readers perspective. Sure you need keywords in there but you also want it to make sense. It also depends whether you are writing a blog or an ecommerce site.
Just remember these the more you include keywords with h1 or h2 in your site the more you dilute the importance of the content. Just follow the KIS principle. You better make sure that you choose the right keywords with h1 or h2 tag.
Also remember that you should ideally optimise each individual page for an individual set of keywords and/or phrases! Definately try and use your keywords or preferrably site specific phrases in the <TITLE> and <H1> tags.
The heading and the title are not the same, and should not necessarily have the same wording. The H1 heading (as you know) shows on the page. The contents of the title tag shows in the title bar of the browser and also (may be) displayed in the search results. This makes the title important for attracting click-throughs from people who view your site in the search results. The heading may have some impact on rankings, but there is considerable debate about how much weight it gets. Most agree that if it gets extra weight, it's not a whole lot. However, almost everyone agrees the title is very important for search results. While it would be silly and redundant to include your company name in the heading on every page, it's absolutely acceptable to include it in the title for branding purposes. Just don't make your company name the entire title. Maybe put it at the end. The first part of the title should be engaging, descriptive and should contain your primary keyword(s) for the page.